RFR: 8345433: (fs) Use stream to load FileTypeDetectors in Files.probeContentType [v2]

Brian Burkhalter bpb at openjdk.org
Wed Dec 4 18:28:14 UTC 2024


On Wed, 4 Dec 2024 18:15:50 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8345433: Move toList() to separate line
>
> src/java.base/share/classes/java/nio/file/Files.java line 1528:
> 
>> 1526:                                       ClassLoader.getSystemClassLoader())
>> 1527:                 .stream()
>> 1528:                 .map(p -> p.get())
> 
> This looks fine, the alternative is to use a method ref, as in map(ServiceLoader.Provider::get) if you want.

So changed in c6f997e.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22552#discussion_r1870071747


More information about the nio-dev mailing list