[jdk8u-dev] Integrated: 8294767: 8u contains two copies of test/../FileUtils.java, one uses JDK9+ features

Jonathan Dowland jdowland at openjdk.org
Tue Dec 6 05:32:52 UTC 2022


On Tue, 4 Oct 2022 13:25:24 GMT, Jonathan Dowland <jdowland at openjdk.org> wrote:

> There are two copies of the test utility class FileUtils.java in the jdk8u-dev source tree:
> 
> 
> $ find . -name FileUtils.java
> ./jdk/test/lib/testlibrary/jdk/testlibrary/FileUtils.java
> ./jdk/test/lib/jdk/test/lib/util/FileUtils.java
> 
> 
> One of them is not used by anything. It also uses language features that are not present in 8u:
> 
> 
> $ $JAVA_HOME/bin/javac ./jdk/test/lib/jdk/test/lib/util/FileUtils.java
> # snip
> ./jdk/test/lib/jdk/test/lib/util/FileUtils.java:166: error: cannot infer type arguments for SimpleFileVisitor<T>
>             java.nio.file.Files.walkFileTree(dir, new SimpleFileVisitor<>() {
>                                                                        ^
>   reason: cannot use '<>' with anonymous inner classes
> 
> 
> The soluton for this case is simple, just remove the above file.
> 
> This is part of a wider issue of duplicated test material, but I'm filing for the one I found for now. 
> 
> * https://bugs.openjdk.org/browse/JDK-8294767

This pull request has now been integrated.

Changeset: 2ad48cb3
Author:    Jonathan Dowland <jdowland at openjdk.org>
URL:       https://git.openjdk.org/jdk8u-dev/commit/2ad48cb3ca0e79346d74dccb5c172a7f017c5c6d
Stats:     276 lines in 1 file changed: 0 ins; 276 del; 0 mod

8294767: 8u contains two copies of test/../FileUtils.java, one uses JDK9+ features

Reviewed-by: sgehwolf, andrew

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

PR: https://git.openjdk.org/jdk8u-dev/pull/129


More information about the jdk8u-dev mailing list