On Tue, 15 Sep 2020 15:29:44 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Remove "final"
>
> src/java.base/share/classes/java/util/jar/JarFile.java line 428:
> 
>> 426:                     try (final InputStream is = 
>> super.getInputStream(manEntry)) {
>> 427:                         man = new Manifest(is, getName());
>> 428:                     }
> 
> There is a cleaner so shouldn't have a leak, even if the JarFile is not 
> explicitly closed.
> The noisy "final" can be dropped, otherwise looks good.

Thank you for the review Alan. I've updated this PR to remove the `final`. And 
yes as you note, this doesn't really
leak. This change closes the InputStream earlier, as soon as it is done, 
instead of waiting for the `Cleaner` to kick
in.

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

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

Reply via email to