RFR: 8366254: (fs) UnixException.translateToIOException should translate ELOOP to FileSystemLoopException

Alan Bateman alanb at openjdk.org
Wed Aug 27 19:32:43 UTC 2025


On Wed, 27 Aug 2025 17:50:13 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Translate a `UnixException` with `errno == ELOOP` to `FileSystemLoopException` instead of the less specific `FileSystemException`.

src/java.base/unix/classes/sun/nio/fs/UnixException.java line 97:

> 95:         if (errno() == UnixConstants.ELOOP)
> 96:             return new FileSystemLoopException(file + ", " + other + ", "
> 97:                 + errorString()

FileSystemLoopException doesn't have have a ctor for the 2-file usages, and 'other' may be null. So need to think if this should be handled at the use-site or whether they should just use 'file'.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26966#discussion_r2305112885


More information about the nio-dev mailing list