Path.compareTo(Path()

Christian Schlichtherle christian at schlichtherle.de
Thu May 26 09:51:04 PDT 2011


The Javadoc says:

 

This method may not be used to compare paths that are associated with
different file system providers.

 

Whereas Path.equals(Object) says:

 

If the given object is not a Path, or is a Path associated with a different
{@code FileSystem}, then this method returns {@code false}

 

This is inconsistent. If required at all, both methods should discriminate
on the FileSystem, not the FileSystemProvider.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20110526/47931022/attachment.html 


More information about the nio-discuss mailing list