RFR: 8355342: File.getCanonicalPath on Java 24 resolves paths on network drives to UNC format [v6]
Brian Burkhalter
bpb at openjdk.org
Mon Oct 20 21:50:01 UTC 2025
On Mon, 20 Oct 2025 20:56:16 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> In the following [...]
In the above tables, I think that
- the result of `getCanonicalPath` for `Z:\linktonotexist` should be `NoSuchFileException` for both mappings,
- the result of `toRealPath` for `Z:\linktofile` should be `Z:\file.txt` for both mappings (*), and
- the result of `toRealPath` for `Z:\linktonotexist` with remote mapping should be `NoSuchFileException` (map error 1921 to error 3, `ERROR_PATH_NOT_FOUND`).
(*) In separate testing, falling back to `WindowsLinkSupport.resolveAllLinks` when `WindowsLinkSupport.getFinalPath` fails, yields the desired output from `toRealPath`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27324#issuecomment-3423852891
More information about the core-libs-dev
mailing list