[PATCH] 8004789 : (zipfs) zip provider doesn't work correctly with file systems providers rather than the default

Alan Bateman Alan.Bateman at oracle.com
Tue Dec 11 10:05:27 PST 2012


On 10/12/2012 19:02, Philippe Marschall wrote:
> :
>
> #toAbsolutePath() is in for two reasons. First it's there in the
> existing code and I wanted to change as little as possible to keep the
> side effects as small as possible. Second I believe it would be
> theoretically possible (and spec compliant) to create a zipfs on a
> relative path. In such a case #getParent() may return null. For that
> to happen a file system provider would have to support creating
> relative paths from an URI. I don't recall any part of the spec that
> would forbid this. Path#toUri() describes the behaviour of the default
> provider and says all other providers can do what they want. However
> you're certainly more familiar with the spec than I am.
>
The toAbsolutePath is mostly harmless here, but not strictly required 
because all the Files methods accept relative paths.

-Alan.



More information about the nio-dev mailing list