A DESCRIPTION OF THE PROBLEM :
Caused by the fix forJDK-8242258
jdk.internal.jrtfs.JrtPath.toUri() does not properly encode code points > 127, respectively is not applying UTF-8 encoding.
---------- BEGIN SOURCE ----------
FileSystem fileSystem = FileSystems.getFileSystem(URI.create("jrt:/"));
String originalPath = "/modules/\u00E4";
Path path = fileSystem.getPath(originalPath);
URI uri = path.toUri();
String reconverted = fileSystem.provider().getPath(uri).toString();
System.out.println("Result: " + reconverted);
System.out.println("Are paths equal: " + reconverted.equals(originalPath));
---------- END SOURCE ----------
Caused by the fix for
jdk.internal.jrtfs.JrtPath.toUri() does not properly encode code points > 127, respectively is not applying UTF-8 encoding.
---------- BEGIN SOURCE ----------
FileSystem fileSystem = FileSystems.getFileSystem(URI.create("jrt:/"));
String originalPath = "/modules/\u00E4";
Path path = fileSystem.getPath(originalPath);
URI uri = path.toUri();
String reconverted = fileSystem.provider().getPath(uri).toString();
System.out.println("Result: " + reconverted);
System.out.println("Are paths equal: " + reconverted.equals(originalPath));
---------- END SOURCE ----------
- relates to
-
JDK-8242258 (jrtfs) Path::toUri throws AssertionError for malformed input
- Closed