Skip to content

Commit

Permalink
Handle possible exception in finally block
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-m committed May 15, 2012
1 parent 56463aa commit 1f96c02
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java
Expand Up @@ -2017,12 +2017,16 @@ public void copyCaseDB(String newDBPath) throws IOException {
out.write(readBytes);
}
} finally {
if (in != null) {
in.close();
}
if (out != null) {
out.flush();
out.close();
try {
if (in != null) {
in.close();
}
if (out != null) {
out.flush();
out.close();
}
} catch (IOException e) {
Logger.getLogger(SleuthkitCase.class.getName()).log(Level.WARNING, "Could not close streams after db copy", e);
}
SleuthkitCase.dbReadUnlock();
}
Expand Down

0 comments on commit 1f96c02

Please sign in to comment.