RFR: 8360028: (fs) Path.relativize throws StringIndexOutOfBoundsException (win)
Brian Burkhalter
bpb at openjdk.org
Tue Jul 1 22:46:37 UTC 2025
On Tue, 1 Jul 2025 22:36:42 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Ignore empty name elements in `WindowsPath.normalize()`.
Other, alternative changes which also fix this problem include:
- modifying `WindowsPath.initOffsets` not to include empty names;
- modifying `WindowsPath.initOffsets` to ignore consecutive backward slashes (``);
- modifying `WindowsFileSystemProvider.readSymbolicLink` to normalize the path string obtained from the link before creating the `WindowsPath`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26080#issuecomment-3025775020
More information about the nio-dev
mailing list