RFR: 8365807: (fs) Two-arg UnixFileAttributes.getIfExists should not use exception for control flow [v3]

Brian Burkhalter bpb at openjdk.org
Mon Aug 25 19:44:13 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)`.

Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:

  8365807: Reinstate stat2; add fstatat2 returning errno

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26889/files
  - new: https://git.openjdk.org/jdk/pull/26889/files/7ea1b084..91bb2e41

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=26889&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26889&range=01-02

  Stats: 53 lines in 3 files changed: 28 ins; 7 del; 18 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