RFR: 8274809: Update java.base classes to use try-with-resources [v4]
Andrey Turbanov
duke at openjdk.java.net
Fri Dec 10 18:21:50 UTC 2021
On Tue, 7 Dec 2021 07:59:54 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8274809: Update java.base classes to use try-with-resources
>> fix review comments
>
> src/java.base/share/classes/sun/net/NetProperties.java line 73:
>
>> 71: try (FileInputStream in = new FileInputStream(fname);
>> 72: BufferedInputStream bin = new BufferedInputStream(in))
>> 73: {
>
> Style-wisee I'd probably put the "{" at the end of L72.
As you wish.
But I personally like to have `{` on separate line, in case of multi-line `try`. It makes clear when `try` header is actually finished and body starts.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5818
More information about the security-dev
mailing list