RFR: 8264400: (fs) WindowsFileStore equality depends on how the FileStore was constructed
Brian Burkhalter
bpb at openjdk.java.net
Mon Apr 5 17:22:20 UTC 2021
On Fri, 2 Apr 2021 16:49:31 GMT, Brian Burkhalter <bpb 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.
>
> I already have this information.
>
> 1. `C:` - Win10 system drive
>
> `Root: C:\
> volName: System, fsName: NTFS, volSN: 1620920694, volType: 3`
>
> 2. `E:` - CD drive (VirtualBox Guest Additions)
>
> `Root: E:\
> volName: VBox_GAs_6.1.18, fsName: CDFS, volSN: -1657170319, volType: 5`
>
> 3. `Z:` - VirtualBox shared folder
>
> `Root: Z:\
> volName: VBOX_VirtualBox, fsName: VBoxSharedFolderFS, volSN: 16777221, volType:
> 4`
>
> 4. `\\BPB\Public` - Local share created for `C:\Users\Public`
>
> `Root: \\BPB\Public\
> volName: System, fsName: NTFS, volSN: 1620920694, volType: 4`
>
> 5. `\\192.168.0.111\Shared` - "Remote" share of macOS host `/Users/Shared`
>
> `Root: \\192.168.0.111\Shared\
> volName: Macintosh HD - Data, fsName: NTFS, volSN: 0, volType: 4`
I already tested with other cases but didn't include it:
Root: \\bpb\Public\
volName: System, fsName: NTFS, volSN: 1620920694, volType: 4
Root: \\BPB\pUBLIC\
volName: System, fsName: NTFS, volSN: 1620920694, volType: 4
Root: \\192.168.0.111\Shared\
volName: Macintosh HD - Data, fsName: NTFS, volSN: 0, volType: 4
Root: \\192.168.0.111\shared\
volName: Macintosh HD - Data, fsName: NTFS, volSN: 0, volType: 4
Good point about `hashCode()`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3279
More information about the nio-dev
mailing list