RFR: 8345433: (fs) Use stream to load FileTypeDetectors in Files.probeContentType
Andrey Turbanov
aturbanov at openjdk.org
Wed Dec 4 17:00:41 UTC 2024
On Wed, 4 Dec 2024 16:34:20 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Change `FileTypeDetector` list creation to use a stream rather than an iteration and adds.
src/java.base/share/classes/java/nio/file/Files.java line 1528:
> 1526: ClassLoader.getSystemClassLoader())
> 1527: .stream()
> 1528: .map(p -> p.get()).toList();
Let's move `.toList();` to a separate line
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22552#discussion_r1869944864
More information about the nio-dev
mailing list