RFR: 8356678: (fs) Files.readAttributes should map ENOTDIR to NoSuchFileException where possible (unix)

Brian Burkhalter bpb at openjdk.org
Mon May 12 19:41:14 UTC 2025


Treat `ENOTDIR` as causing a `NoSuchFileException` instead of a `FileSystemExcception` in some places in order to handle cases such as a regular file named, for example, `foo/bar`.

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

Commit messages:
 - 8356678: (fs) Files.readAttributes should map ENOTDIR to NoSuchFileException where possible (unix)

Changes: https://git.openjdk.org/jdk/pull/25191/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25191&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8356678
  Stats: 115 lines in 4 files changed: 111 ins; 1 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/25191.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25191/head:pull/25191

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


More information about the nio-dev mailing list