RFR: 8286160: (fs) Files.exists returns unexpected results with C:\pagefile.sys because it's not readable

Brian Burkhalter bpb at openjdk.java.net
Mon Jun 6 22:38:40 UTC 2022


If in `WindosFileSystemProvider.checkAccess(Path obj, AccessMode... modes)` the sub-test `checkReadAccess(WindowsPath)` fails and no modes are specified, then try to determine file existence by reading the file's attributes.

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

Commit messages:
 - 8286160: (fs) Files.exists returns unexpected results with C:\pagefile.sys because it's not readable

Changes: https://git.openjdk.java.net/jdk/pull/9045/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9045&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8286160
  Stats: 55 lines in 2 files changed: 38 ins; 5 del; 12 mod
  Patch: https://git.openjdk.java.net/jdk/pull/9045.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/9045/head:pull/9045

PR: https://git.openjdk.java.net/jdk/pull/9045


More information about the nio-dev mailing list