RFR 8141521: jrt file system's DirectoryStream reports child paths with wrong paths for directories under /packages

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Wed Nov 11 15:46:00 UTC 2015


Hi,

Please find the updated webrev @ 
http://cr.openjdk.java.net/~sundar/8141521/webrev.01/

* Removed NodeAndImage and related stuff. Using just Node always. Using 
resolve in DirectoryStream - just "file" names of child Nodes appended 
to parent dir now.

* Using AbstractJrtPath in many places instead of byte[] and converting 
to getResolvedPath whereever jimage Node lookup has to be done.

* Expanded Basic.java /packages tests with "..", "." in the path etc. 
All cases pass now.

* Reduced long line length in places.

PS. Got distracted by another bug in UTF8String.toString - which I'm 
fixing as part of the new webrev! That caused the delay in debugging 
test issues [apart from holidays in between]

Thanks,
-Sundar

On 11/5/2015 9:04 PM, Alan Bateman wrote:
>
>
> On 05/11/2015 09:45, Sundararajan Athijegannathan wrote:
>> Please review http://cr.openjdk.java.net/~sundar/8141521/webrev.00/ 
>> for https://bugs.openjdk.java.net/browse/JDK-8141521
> The NodeAndImage.symLink field looks very strange as a DirectoryStream 
> just needs the names of the entries where each is resolved against the 
> Path that newDirectoryStream is called on. I just wonder how it works 
> with a combination of "." and ".." and other interesting paths.
>
> In the test then shouldn't L608 be child.startsWith(path) as this 
> should not be a String comparison. I also wonder having a much more 
> expanded test for newDirectoryStream as this should have been caught 
> by unit tests.
>
> BTW: A small request but would it be possible to reduce the length of 
> the some of the really long lines. It makes it a bit easier to do 
> side-by-side reviews when there isn't horizontal scrolling.
>
> -Alan



More information about the jigsaw-dev mailing list