RFR: 8374441: FileSystemProvider.readAttributesIfExists should return null for ENOTDIR (unix)
Fabian Meumertzheim
fmeum at openjdk.org
Fri Jan 2 11:42:01 UTC 2026
On Wed, 31 Dec 2025 21:14:29 GMT, Fabian Meumertzheim <fmeum at openjdk.org> wrote:
> `FileSystemProvider.readAttributesIfExists` now returns `null` for a path with a true prefix that is not a directory rather than throwing `NotDirectoryException`.
I added more details to the JBS issue. Bazel would like to use the provider method directly so that it doesn't have to pay for the cost of an exception in the case where a file does not exist, but our tests show that the method still throws in some edge cases in which the file is considered missing by higher-level APIs.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29013#issuecomment-3705149978
More information about the nio-dev
mailing list