multiple copies of test file FileUtils.java in 8u tree
Jonathan Dowland
jdowland at redhat.com
Wed Sep 21 09:59:49 UTC 2022
On Wed, Sep 21, 2022 at 10:50:48AM +0100, Jonathan Dowland wrote:
>Whilst working on a backport, I discovered the following two files in
>the 8u source tree
>
> ./jdk/test/lib/testlibrary/jdk/testlibrary/FileUtils.java
> ./jdk/test/lib/jdk/test/lib/util/FileUtils.java
To make things possibly simpler, it seems nothing is using the copy in
test/lib/util, and it is not valid Java 8:
/home/jon/rh/git/jdk.worktree.jdk8u-dev/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
where T is a type-variable:
T extends Object declared in class SimpleFileVisitor
/home/jon/rh/git/jdk.worktree.jdk8u-dev/jdk/test/lib/jdk/test/lib/util/FileUtils.java:245: error: cannot find symbol
List<String> lsofDirs = List.of("/usr/bin", "/usr/sbin");
^
symbol: method of(String,String)
location: interface List
/home/jon/rh/git/jdk.worktree.jdk8u-dev/jdk/test/lib/jdk/test/lib/util/FileUtils.java:253: error: cannot find symbol
long pid = ProcessHandle.current().pid();
^
symbol: variable ProcessHandle
location: class FileUtils
/home/jon/rh/git/jdk.worktree.jdk8u-dev/jdk/test/lib/jdk/test/lib/util/FileUtils.java:260: error: cannot find symbol
p.getInputStream().transferTo(ps);
^
symbol: method transferTo(PrintStream)
location: class InputStream
--
👱🏻 Jonathan Dowland <jdowland at redhat.com>
Senior Software Engineer, OpenJDK, Red Hat
More information about the jdk8u-dev
mailing list