<i18n dev> RFR: 8290316: Ensure that all directory streams are closed in java.base
Alan Bateman
alanb at openjdk.org
Fri Jul 15 16:43:06 UTC 2022
On Fri, 15 Jul 2022 16:06:21 GMT, Ryan Ernst <duke at openjdk.org> wrote:
> This commit guards uses of Files methods returning path streams in
> java.base to use try-with-resources.
src/java.base/share/classes/jdk/internal/module/ModuleHashes.java line 119:
> 117: }
> 118: try {
> 119: byte[] buf = new byte[32*1024];
Can you move the declaration of bug to before the try? That would reduce the nesting.
-------------
PR: https://git.openjdk.org/jdk/pull/9518
More information about the i18n-dev
mailing list