mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8274809: Update java.base classes to use try-with-resources
Reviewed-by: mullan, alanb, dfuchs
This commit is contained in:
parent
debaa28e9c
commit
dee447f8ae
7 changed files with 20 additions and 58 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -225,7 +225,9 @@ public class KeyStoreUtil {
|
|||
|
||||
List<String> result = new ArrayList<>();
|
||||
Properties p = new Properties();
|
||||
p.load(new FileInputStream(file));
|
||||
try (FileInputStream is = new FileInputStream(file)) {
|
||||
p.load(is);
|
||||
}
|
||||
|
||||
String s = p.getProperty(tool + ".all");
|
||||
if (s != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue