RFR: 8340087: (fs) Files.copy include symbolic link detailed message for NoSuchFileException

xpbob duke at openjdk.org
Fri Sep 13 07:05:14 UTC 2024


(fs) Files.copy include symbolic link detailed message for NoSuchFileException

Description
Simulation case:

touch testfile
ln -s testfile testlink
mv testfile testfile1


code:

    public static void main(String[] args) throws IOException {
        Files.copy(Paths.get("/data/testfiles/testlink"), Paths.get("/data/testfiles/xx"));
    }


Program current information:
Exception in thread "main" java.nio.file.NoSuchFileException: /data/testfiles/testlink


Devops check file exists with ll

After additional information:
Exception in thread "main" java.nio.file.NoSuchFileException: /data/testfiles/testlink: due to testfile

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

Commit messages:
 - 8340087: (fs) Files.copy include symbolic link detailed message for NoSuchFileException

Changes: https://git.openjdk.org/jdk/pull/20984/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20984&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8340087
  Stats: 25 lines in 1 file changed: 13 ins; 11 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/20984.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20984/head:pull/20984

PR: https://git.openjdk.org/jdk/pull/20984


More information about the nio-dev mailing list