RFR: 8355342: File.getCanonicalPath on Java 24 resolves paths on network drives to UNC format [v8]
Brian Burkhalter
bpb at openjdk.org
Mon Oct 27 23:24:35 UTC 2025
> `File.getCanonicalPath` invokes `GetFinalPathNameByHandle` on the result of `canonicalize0` which causes the drive letter of a mapped drive to be converted to a UNC prefix. If such a substitution is detected, this request proposes to revert the conversion of drive letter to UNC prefix before returning the canonical path.
Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
- 8355342: Derive final path only for reparse points
- Merge
- 8355342: Remove unused, vestigial code
- 8355342: Do not check for backslash as third character of input pathname string
- 8355342: Fall back to canonicalize0() result if drive letter converted to a long / UNC prefix
- Merge
- Merge
- 8355342: Corrected a comment
- 8355342: Add missing space in constant declaration
- 8355342: Fix possible sneaky NullPointerException
- ... and 1 more: https://git.openjdk.org/jdk/compare/253f1dfc...e4cad2b1
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27324/files
- new: https://git.openjdk.org/jdk/pull/27324/files/d88320a6..e4cad2b1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27324&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27324&range=06-07
Stats: 35449 lines in 890 files changed: 19072 ins; 11590 del; 4787 mod
Patch: https://git.openjdk.org/jdk/pull/27324.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27324/head:pull/27324
PR: https://git.openjdk.org/jdk/pull/27324
More information about the core-libs-dev
mailing list