提交 37fec98b 编写于 作者: V vinnie

8026301: DomainKeyStore doesn't cleanup correctly when storing to keystore

Reviewed-by: mullan
上级 7a902edb
......@@ -652,9 +652,12 @@ abstract class DomainKeyStore extends KeyStoreSpi {
// Store the keystores
KeyStore keystore = keystores.get(builder.name);
keystore.store(new FileOutputStream(builder.file),
password);
try (FileOutputStream stream =
new FileOutputStream(builder.file)) {
keystore.store(stream, password);
}
} catch (KeyStoreException e) {
throw new IOException(e);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册