Skip to content

Commit

Permalink
additional fixes from issue #3
Browse files Browse the repository at this point in the history
  • Loading branch information
commonsguy committed Nov 28, 2016
1 parent 2b763a9 commit 97ba267
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ private void ensureInitialized() {
e);
} finally {
try {
in.close();
if (in!=null) {
in.close();
}
} catch (RuntimeException rethrown) {
throw rethrown;
} catch (Exception ignored) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ private X509Certificate readCertificate(File file) {
return null;
} finally {
try {
is.close();
if (is!=null) {
is.close();
}
} catch (RuntimeException rethrown) {
throw rethrown;
} catch (Exception ignored) {
Expand All @@ -211,7 +213,9 @@ private void writeCertificate(File file, X509Certificate cert)
os.write(cert.getEncoded());
} finally {
try {
os.close();
if (os!=null) {
os.close();
}
} catch (RuntimeException rethrown) {
throw rethrown;
} catch (Exception ignored) {
Expand Down

0 comments on commit 97ba267

Please sign in to comment.