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

SendaoYan syan at openjdk.org
Thu Nov 13 04:03:42 UTC 2025


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.

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

Commit messages:
 - 8371697: FileStore.getFileAttributeView("dos") should return null if unavailable

Changes: https://git.openjdk.org/jdk/pull/28281/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28281&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8371697
  Stats: 26 lines in 1 file changed: 21 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/28281.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28281/head:pull/28281

PR: https://git.openjdk.org/jdk/pull/28281


More information about the nio-dev mailing list