8225461: (fs) Investigate filtering duplicates out of Iterable returned by java.nio.file.FileSystem::getFileStores
Brian Burkhalter
brian.burkhalter at oracle.com
Mon Jun 10 23:26:43 UTC 2019
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.
Thanks,
Brian
More information about the nio-dev
mailing list