RFR: 8355342: File.getCanonicalPath on Java 24 resolves paths on network drives to UNC format [v4]
Brian Burkhalter
bpb at openjdk.org
Mon Sep 22 22:47:29 UTC 2025
On Thu, 18 Sep 2025 16:32:45 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> Are you able to check how it behaves when mapped to a location on different host?
>From issue [JDK-8368165](https://bugs.openjdk.org/browse/JDK-8368165):
Path.of("Z:\\link").toRealPath() throws an exception on the Windows host where Z: is mapped to a remote drive on a Mac host via Samba:
| Exception java.nio.file.FileSystemException: Z:\link: The name of the file cannot be resolved by the system
| at WindowsException.translateToIOException (WindowsException.java:92)
| at WindowsException.rethrowAsIOException (WindowsException.java:103)
| at WindowsException.rethrowAsIOException (WindowsException.java:108)
| at WindowsLinkSupport.getFinalPath (WindowsLinkSupport.java:104)
| at WindowsLinkSupport.getRealPath (WindowsLinkSupport.java:271)
| at WindowsPath.toRealPath (WindowsPath.java:944)
| at WindowsPath.toRealPath (WindowsPath.java:42)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27324#issuecomment-3321745093
More information about the core-libs-dev
mailing list