On Tue, 12 Oct 2021 06:16:00 GMT, Sergey Bylokhov <[email protected]> wrote:
>> Andrey Turbanov has updated the pull request incrementally with two
>> additional commits since the last revision:
>>
>> - 8274893: Update java.desktop classes to use try-with-resources
>> close nested resources too
>> - [PATCH] Use try-with-resources to close resources in java.desktop
>
> src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java line
> 587:
>
>> 585: // Pending: verify character encoding spec for gconf
>> 586: StringBuilder sb = new StringBuilder();
>> 587: try (Reader reader = new
>> InputStreamReader(url.openStream(), ISO_8859_1)) {
>
> I did not check all code but look like in some places the close method was
> missed when a few streams were wrapped.
> Looks like in this place, the "url.openStream()" may be leaked if the
> constructor of InputStreamReader will throw an exception. Please check other
> places for similar issues.
updated
-------------
PR: https://git.openjdk.java.net/jdk/pull/5817