Skip to content

Commit

Permalink
try.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehta19 committed Oct 2, 2024
1 parent 7a879a2 commit 1d53927
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ FakeWriter setFailureReason(String failureReason) {
@CanIgnoreReturnValue
FakeWriter initializePrivateKey() throws InvalidKeySpecException, NoSuchAlgorithmException,
IOException, FileNotFoundException, UnsupportedEncodingException {
FileInputStream keyInputStream =
new FileInputStream(keyFile);
privateKey =
CertificateUtils.getPrivateKey(keyInputStream);
FileInputStream keyInputStream = new FileInputStream(keyFile);
try {
privateKey = CertificateUtils.getPrivateKey(keyInputStream);
} finally {
keyInputStream.close();
}
return this;
}

Expand Down

0 comments on commit 1d53927

Please sign in to comment.