RFR: 8264400: (fs) WindowsFileStore equality depends on how the FileStore was constructed
Brian Burkhalter
bpb at openjdk.java.net
Wed Mar 31 15:39:20 UTC 2021
On Wed, 31 Mar 2021 10:35:42 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Please consider this change to make `sun.nio.fs.WindowsFileStore.equals()` return `true` if the root strings of the two objects are equal under case insensitive comparison, and the two `WindowsFileStore`s have the same volume information.
>
> src/java.base/windows/classes/sun/nio/fs/WindowsFileStore.java line 243:
>
>> 241: volInfo.volumeSerialNumber() == otherInfo.volumeSerialNumber();
>> 242: }
>> 243: return false;
>
> The volType == DRIVE_REMOTE case is the reason why we didn't fix this one in the past. Can you summarise that the VolumeInfomation is for this case?
I was not able to test that case yet. Using the VolumeInformation was intended to limit spurious equality.
Can you explain abut DRIVE_REMOTE?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3279
More information about the nio-dev
mailing list