8026301: DomainKeyStore doesn't cleanup correctly when storing to keystore
Reviewed-by: mullan
This commit is contained in:
parent
0a60664cf1
commit
848f690d01
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user