Oversight in documentation about the behaviour of .resolve{Sibling}() and .relativize()?

Francis Galiegue fgaliegue at gmail.com
Sat Mar 22 08:45:01 UTC 2014


Hello,

I am in the process of implementing a FileSystem over FTP, so I
experimented with some not-that-much-used stuff and discovered that if
you try and p1.resolve(p2), where p1 and p2 are Paths issued from
different FileSystems, you get a ProviderMismatchException.

I discovered it the hard way, since this is not documented! Can this
be documented in future JDK releases?

Also, since this is FTP, I don't have any "device" size information
about the other end; the javadoc of FileStore doesn't tell what the
.get*Space() methods return in this case.

RIght now I return Long.MAX_VALUE. Is that OK? And can the behaviour
in this case be documented as well?

Regards,
-- 
Francis Galiegue, fgaliegue at gmail.com
JSON Schema in Java: http://json-schema-validator.herokuapp.com


More information about the nio-dev mailing list