[14] RFC: 8219644: java/nio/file/Files/CopyAndMove.java: Test threw exception: java.lang.RuntimeException: AtomicMoveNotSupportedException expected

Brian Burkhalter brian.burkhalter at oracle.com
Thu Jun 13 18:09:47 UTC 2019


> On Jun 13, 2019, at 11:03 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> 
> On 13/06/2019 18:51, Brian Burkhalter wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8219644 <https://bugs.openjdk.java.net/browse/JDK-8219644>
>> 
>> This particular problem was due to two Windows paths beginning with “c:” and “C:” respectively being considered as different FileStores. This is because equals() depends on String.equals() applied to the “root” instance variable in WindowsFileStore. Could this perhaps be changed to equalsIgnoreCase() (and hashCode() to use toLowerCase())? Is “root” always a drive letter or do other mount types come into play? 
> It's also used to create a FileStore for files on UNCs so care is needed.

I guess that could be detected by the first character being a ‘/‘ or by using Character.isLetter().

>> Or maybe the test could be changed to be robust to case?
>> 
> That would be fine but worth investigating if WindowsFileStore needs changes too.

OK.

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190613/99d38753/attachment-0001.html>


More information about the nio-dev mailing list