A DESCRIPTION OF THE PROBLEM :
jrt FileSystem's Path.toUri() throws AssertionErrors for paths starting with "/modules" followed by a char sequence which URI considers an invalid IPv6 address.
The behavior before JDK 13 might be different due to JDK-8224946, there the path must not have the "/modules" prefix, but instead directly have the invalid IPv6 address.
---------- BEGIN SOURCE ----------
try {
FileSystems.getFileSystem(URI.create("jrt:/")).getPath("/modules/[").toUri();
throw new RuntimeException("Expected AssertionError");
}
catch (AssertionError expected) {
expected.printStackTrace();
}
---------- END SOURCE ----------