RFR: 8290316: Ensure that all directory streams are closed in java.base [v2]
Bernd
duke at openjdk.org
Sat Jul 16 03:39:11 UTC 2022
On Fri, 15 Jul 2022 19:33:56 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.
>
> Ryan Ernst has updated the pull request incrementally with one additional commit since the last revision:
>
> address formatting feedback
src/java.base/share/classes/java/time/chrono/HijrahChronology.java line 1041:
> 1039: try (Stream<Path> stream = Files.list(CONF_PATH)) {
> 1040: stream.map(p -> p.getFileName().toString())
> 1041: .filter(fn -> fn.matches("hijrah-config-[^\\.]+\\.properties"))
BTW Should this use RESOURCE_PREFIX/SUFFIX and is the \\ inside [character class] suppose to quote the .?
-------------
PR: https://git.openjdk.org/jdk/pull/9518
More information about the core-libs-dev
mailing list