Possible jrt filesystem bug
Philippe Marschall
philippe.marschall at netcetera.ch
Tue Nov 3 08:25:09 UTC 2015
Hi
I have encountered something with I believe may be a bug in the jrt
filesystem.
The children/directory entries of
/packages/com.oracle/java.xml.ws/com are
/modules/java.xml.ws/com/sun
/modules/java.xml.ws/com/oracle
when I believe they should be:
/packages/com.oracle/java.xml.ws/com/sun
/packages/com.oracle/java.xml.ws/com/oracle
You can use the following code to reproduce the issue:
FileSystem fileSystem = FileSystems.getFileSystem(URI.create("jrt:/"));
Path parent = fileSystem.getPath("/packages/com.oracle/java.xml.ws/com");
try (DirectoryStream<Path> directoryStream =
Files.newDirectoryStream(parent)) {
for (Path each : directoryStream) {
System.out.println(" parent: " + parent + " child: " + each + "
startsWith: " + each.startsWith(parent));
}
}
The output I get is:
parent: /packages/com.oracle/java.xml.ws/com child:
/modules/java.xml.ws/com/oracle startsWith: false
parent: /packages/com.oracle/java.xml.ws/com child:
/modules/java.xml.ws/com/sun startsWith: false
This is based on b86 with Jigsaw on Mac OS.
Cheers
Philippe
More information about the jigsaw-dev
mailing list