RFR: 8274893: Update java.desktop classes to use try-with-resources [v3]

Sergey Bylokhov serb at openjdk.java.net
Fri Nov 19 19:29:10 UTC 2021


On Thu, 18 Nov 2021 18:32:30 GMT, Andrey Turbanov <duke at openjdk.java.net> wrote:

>> src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java line 463:
>> 
>>> 461:                         new InputStreamReader(is, ISO_8859_1));
>>> 462:                 defaultStyles.loadRules(r, null);
>>> 463:                 r.close();
>> 
>> the reader was not added to the try block, it will not be closed.
>
> updated

What about "new InputStreamReader()" here and below?

-------------

PR: https://git.openjdk.java.net/jdk/pull/5817



More information about the client-libs-dev mailing list