Possible jrt filesystem bug

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Thu Nov 5 08:52:41 UTC 2015


Hi,

I filed a bug : https://bugs.openjdk.java.net/browse/JDK-8141521

Thanks for reporting this issue,
-Sundar

On 11/3/2015 1:55 PM, Philippe Marschall wrote:
> 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