RFR: 8365807: (fs) Two-arg UnixFileAttributes.getIfExists should not use exception for control flow
Brian Burkhalter
bpb at openjdk.org
Thu Aug 21 22:09:27 UTC 2025
In the Unix implementation of `sun.nio.fs`, change
1. `UnixFileAttributes.getIfExists(UnixPath,boolean)` to use the system call success status and `errno` for control flow; and
2. `UnixFileAttributes.getIfExists(UnixPath)` to simply return `UnixFileAttributes.getIfExists(UnixPath,true)`.
-------------
Commit messages:
- 8365807: (fs) Two-arg UnixFileAttributes.getIfExists should not use exception for control flow
Changes: https://git.openjdk.org/jdk/pull/26889/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26889&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8365807
Stats: 39 lines in 3 files changed: 7 ins; 13 del; 19 mod
Patch: https://git.openjdk.org/jdk/pull/26889.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26889/head:pull/26889
PR: https://git.openjdk.org/jdk/pull/26889
More information about the nio-dev
mailing list