Refactoring

See github line by line comments in 'File changed'
This commit is contained in:
vraskulin 2016-12-29 16:49:12 +03:00
parent c0cf22bbf7
commit f04ba151f7
52 changed files with 87 additions and 220 deletions

View file

@ -64,12 +64,9 @@ public class Copier<T> {
ObjectInputStream in = new CopierObjectInputStream(loader, fbos.getInputStream());
copy = (T) in.readObject();
}
catch(IOException e) {
catch(IOException | ClassNotFoundException e) {
e.printStackTrace();
}
catch(ClassNotFoundException cnfe) {
cnfe.printStackTrace();
}
return copy;
}
@ -99,12 +96,9 @@ public class Copier<T> {
try (ObjectInputStream in = new CopierObjectInputStream(loader, new GZIPInputStream(new ByteArrayInputStream(buffer)))) {
copy = (T) in.readObject();
}
catch(IOException e) {
catch(IOException | ClassNotFoundException e) {
e.printStackTrace();
}
catch(ClassNotFoundException cnfe) {
cnfe.printStackTrace();
}
return copy;
}
}