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

Alan Bateman alanb at openjdk.org
Fri Nov 14 07:19:08 UTC 2025


On Fri, 14 Nov 2025 03:15:12 GMT, SendaoYan <syan at openjdk.org> wrote:

> If FileStore.supportsFileAttributeView(viewClass) and FileStore.supportsFileAttributeView(viewName) return false, does it means the attribute view is not available? If it does, I think the test do the right thing; If not, maybe we should fix this test.

A file system may be composed of many underlying file systems / volumes (modelled as FileStore in this API). A FileSystemProvider may support many views but some of these attributes in these views may not supported on all FileStores. 

>From the bug report then my guess is that this Linux file system doesn't have extended attributes enabled and this has tickled a bug in the test. In the test, I see the testFileAttributes method tests haveView == supported but this is not correct when the underlying FileStore doesn't support it. So I think we should rename the JBS issue to make it clear that it's a test failure, and fix the test.

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

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


More information about the nio-dev mailing list