8225461: (fs) Investigate filtering duplicates out of Iterable returned by java.nio.file.FileSystem::getFileStores

Alan Bateman Alan.Bateman at oracle.com
Tue Jun 11 10:46:42 UTC 2019


On 11/06/2019 00:26, Brian Burkhalter wrote:
> https://bugs.openjdk.java.net/browse/JDK-8225461
> http://cr.openjdk.java.net/~bpb/8225461/webrev.00/
>
> This implements, at least for Unix file systems, filtering out any duplicate mount entries so that FileSystem::getFileStores() does not contain any duplicates. It also modifies the test java/nio/file/FileStore/Basic.java to check for duplicate FileStores instead of just two successive stores being equal. In the test the call to FileUtils.areAllMountPointsAccessible() is replaced with FileUtils.areFileSystemsAccessible() and the former method is removed from jdk.test.lib.util.FileUtils as this was its only use.
>
> I don’t know whether the specification of FileSystem::getFileStores() should be updated to indicate that no duplicate stores are returned, which would necessitate a CSR.
>
This issue is going a bit of time to review as it changes the meaning of 
equals/hashCode and has several other implications that will take time 
to work through. I will try to get to it soon, but maybe not this week.

-Alan


More information about the nio-dev mailing list