RFR: 8371697: FileStore.getFileAttributeView("dos") should return null if unavailable

Alan Bateman alanb at openjdk.org
Thu Nov 13 07:03:11 UTC 2025


On Thu, 13 Nov 2025 03:54:26 GMT, SendaoYan <syan at openjdk.org> wrote:

> Hi all,
> 
> I found that FileStore.supportsFileAttributeView("dos") return false, but Files.getFileAttributeView(file, viewClass) return none null, cause test/jdk/java/nio/file/FileStore/Basic.java fails on some linux-aarch64 machines.
> 
> This PR add check supportsFileAttributeView before return FileAttributeView in function getFileAttributeView.

Files.getFileAttributeView returns a FileAttributeView if the file system provider supports it. I don't think we have an implementation bug here, instead I suspect there is a test issue here.

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

PR Comment: https://git.openjdk.org/jdk/pull/28281#issuecomment-3525872182


More information about the nio-dev mailing list