RFR: 8274809: Update java.base classes to use try-with-resources
Bradford Wetmore
wetmore at openjdk.java.net
Wed Oct 6 16:14:09 UTC 2021
On Tue, 5 Oct 2021 09:36:23 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:
> 8274809: Update java.base classes to use try-with-resources
I checked the rest. The one BufferedInputStream change is puzzling. Please explain or address.
Files like HttpTimestamper need the copyright dates updated to 2021.
src/java.base/share/classes/sun/net/NetProperties.java line 71:
> 69: f = new File(f, "net.properties");
> 70: fname = f.getCanonicalPath();
> 71: try (FileInputStream fis = new FileInputStream(fname)) {
Why did the BufferedInputStream get pulled out here?
src/java.base/share/classes/sun/security/util/PolicyUtil.java line 156:
> 154: }
> 155:
> 156: try (InputStream inStream = new BufferedInputStream(getInputStream(keyStoreUrl))) {
Same comment as above.
-------------
Marked as reviewed by wetmore (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5818
More information about the security-dev
mailing list