On Wed, 9 Jul 2025 18:16:44 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8361587: Clean up listFiles sub-test per suggestions > > test/jdk/java/io/File/EmptyPath.java line 216: > >> 214: List<String> ioNames = >> 215: Arrays.asList(files).stream().map(f -> >> f.toString()).toList(); >> 216: Set<String> ioSet = new HashSet(ioNames); > > You can simplify this by collecting into the set, e.g. > > Set<String> ioSet = Arrays.stream(files) > .map(File::getName) > .collect(Collectors.toSet()); So changed in 76b4439. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26224#discussion_r2195723230