Skip to content

Commit

Permalink
Merge pull request #244 from shifujun/master
Browse files Browse the repository at this point in the history
Should not use closeSilently() on ZipFile.
  • Loading branch information
koral-- committed Jan 15, 2016
2 parents 5e793a3 + 67ab931 commit 1c92941
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/pl/droidsonroids/gif/ReLinker.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,15 @@ public boolean accept(File dir, String filename) {
break;
}
} finally {
closeSilently(zipFile);
//Should not use closeSilently() on ZipFile.
//Because ZipFile DO NOT implement Closeable when API < 19.Otherwise, app will crash!!
//http://bugs.java.com/view_bug.do?bug_id=6389768
try {
if (zipFile != null) {
zipFile.close();
}
} catch (IOException ignored) {
}
}
return outputFile;
}
Expand Down

0 comments on commit 1c92941

Please sign in to comment.