-
Bug
-
Resolution: Fixed
-
P4
-
openjdk8u345
-
b01
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8359534 | shenandoah8u372 | Jonathan Dowland | P4 | Resolved | Fixed | b01 |
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.
```
$ 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.
- backported by
-
JDK-8359534 8u contains two copies of test/../FileUtils.java, one uses JDK9+ features
-
- Resolved
-