@Test public void testLoadEmptyRepoOk() throws Exception { File repoFile = createTempFile(); new ConfigFileRepository().load( repoFile ); }
@SuppressWarnings( "unchecked" ) public void load( final File repoFile ) throws IOException { FileInputStream fis = null; ObjectInputStream ois = null; try { fis = new FileInputStream( repoFile ); ois = new ObjectInputStream( fis ); this.mapping.putAll( ( Map<String, ResourceInfo> )ois.readObject() ); } catch ( EOFException exception ) { } catch ( FileNotFoundException exception ) { } catch ( Exception exception ) { throw new IOException( "Invalid repository data?!", exception ); } finally { closeQuietly( ois ); closeQuietly( fis ); } }
ConfigFileRepository { @SuppressWarnings( "unchecked" ) public void load( final File repoFile ) throws IOException { FileInputStream fis = null; ObjectInputStream ois = null; try { fis = new FileInputStream( repoFile ); ois = new ObjectInputStream( fis ); this.mapping.putAll( ( Map<String, ResourceInfo> )ois.readObject() ); } catch ( EOFException exception ) { } catch ( FileNotFoundException exception ) { } catch ( Exception exception ) { throw new IOException( "Invalid repository data?!", exception ); } finally { closeQuietly( ois ); closeQuietly( fis ); } } }
ConfigFileRepository { @SuppressWarnings( "unchecked" ) public void load( final File repoFile ) throws IOException { FileInputStream fis = null; ObjectInputStream ois = null; try { fis = new FileInputStream( repoFile ); ois = new ObjectInputStream( fis ); this.mapping.putAll( ( Map<String, ResourceInfo> )ois.readObject() ); } catch ( EOFException exception ) { } catch ( FileNotFoundException exception ) { } catch ( Exception exception ) { throw new IOException( "Invalid repository data?!", exception ); } finally { closeQuietly( ois ); closeQuietly( fis ); } } ConfigFileRepository(); }
ConfigFileRepository { @SuppressWarnings( "unchecked" ) public void load( final File repoFile ) throws IOException { FileInputStream fis = null; ObjectInputStream ois = null; try { fis = new FileInputStream( repoFile ); ois = new ObjectInputStream( fis ); this.mapping.putAll( ( Map<String, ResourceInfo> )ois.readObject() ); } catch ( EOFException exception ) { } catch ( FileNotFoundException exception ) { } catch ( Exception exception ) { throw new IOException( "Invalid repository data?!", exception ); } finally { closeQuietly( ois ); closeQuietly( fis ); } } ConfigFileRepository(); boolean add( final Configuration configuration, final ConfigFileResource resource ); String getConfigurationPid( final ConfigFileResource resource ); boolean isEmpty(); @SuppressWarnings( "unchecked" ) void load( final File repoFile ); void store( final File repoFile ); }
ConfigFileRepository { @SuppressWarnings( "unchecked" ) public void load( final File repoFile ) throws IOException { FileInputStream fis = null; ObjectInputStream ois = null; try { fis = new FileInputStream( repoFile ); ois = new ObjectInputStream( fis ); this.mapping.putAll( ( Map<String, ResourceInfo> )ois.readObject() ); } catch ( EOFException exception ) { } catch ( FileNotFoundException exception ) { } catch ( Exception exception ) { throw new IOException( "Invalid repository data?!", exception ); } finally { closeQuietly( ois ); closeQuietly( fis ); } } ConfigFileRepository(); boolean add( final Configuration configuration, final ConfigFileResource resource ); String getConfigurationPid( final ConfigFileResource resource ); boolean isEmpty(); @SuppressWarnings( "unchecked" ) void load( final File repoFile ); void store( final File repoFile );  }