Skip to content

Commit

Permalink
Fix source compatibility with Java 6
Browse files Browse the repository at this point in the history
  • Loading branch information
mfilippov committed Aug 23, 2021
1 parent 6ee01ab commit 8fbe225
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -673,8 +673,14 @@ private Path createTestCrl() {
crlBuilder.addExtension(Extension.cRLNumber, false, new CRLNumber(new BigInteger("2")));
X509CRLHolder holder = crlBuilder.build(caSigner);

try (OutputStream fos = Files.newOutputStream(tempFile)) {
OutputStream fos = null;
try {
fos = Files.newOutputStream(tempFile);
fos.write(holder.getEncoded());
} finally {
if (fos != null) {
fos.close();
}
}

return tempFile;
Expand Down

0 comments on commit 8fbe225

Please sign in to comment.