7020517: (fs) FileStore.equals returns true if both volumes have the same serial number

Chris Hegarty chris.hegarty at oracle.com
Mon Feb 21 05:21:23 PST 2011


I think the change look fine.

equals() could compare the volInfo and volType also, but I guess these 
should be the same for identical roots, right?

-Chris.

On 19/02/2011 16:01, Alan Bateman wrote:
>
> One of our tests, test/java/nio/file/Basic.java, fails on Windows when
> there are multiple drives mapped to the same remote file system. The
> problem is that the equals/hashCode methods are based on the volume
> serial number, which probably wasn't a good choice. To fix this I've
> changed the methods to use the volume mount point. The webrev with the
> changes is here:
> http://cr.openjdk.java.net/~alanb/7020517/webrev/
>
> Thanks,
> Alan


More information about the nio-dev mailing list