RFR: 8274809: Update java.base classes to use try-with-resources [v2]
Andrey Turbanov
github.com+741251+turbanoff at openjdk.java.net
Wed Oct 6 18:27:35 UTC 2021
On Wed, 6 Oct 2021 16:20:48 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> src/java.base/share/classes/sun/security/timestamp/HttpTimestamper.java line 127:
>>
>>> 125: // Receive the reply
>>> 126: byte[] replyBuffer = null;
>>> 127: try (BufferedInputStream input = new BufferedInputStream(connection.getInputStream())) {
>>
>> Same comment as above.
>
> In this and the immediately preceding case, it might be better to use `var`.
I like variant with `var` more. Updated
-------------
PR: https://git.openjdk.java.net/jdk/pull/5818
More information about the net-dev
mailing list