RFR: 8024695: new File("").exists() returns false whereas it is the current working directory [v7]

Brian Burkhalter bpb at openjdk.org
Thu Feb 20 22:20:04 UTC 2025


> Update the specification of `java.io.File.exists()` to match its behavior, which seems correct in the context of how the empty abstract pathname is documented elsewhere in the class.

Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:

 - 8024695: Move getCWD to holder; remove Order from test
 - Merge
 - 8024695: Extend and clean up test
 - 8024695: Fix merge error; improve get*Space tests
 - Merge
 - 8024695: Add test of length()
 - 8024695: Change implementation to work for empty path
 - 8024695: new File("").exists() returns false whereas it is the current working directory

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

Changes: https://git.openjdk.org/jdk/pull/22821/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22821&range=06
  Stats: 306 lines in 4 files changed: 263 ins; 1 del; 42 mod
  Patch: https://git.openjdk.org/jdk/pull/22821.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22821/head:pull/22821

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


More information about the core-libs-dev mailing list