java/nio/file/Files/CopyAndMove.java is failing

Alan Bateman Alan.Bateman at oracle.com
Tue Mar 12 08:28:22 UTC 2019


On 12/03/2019 08:21, Lindenmaier, Goetz wrote:
> Hi Roger,
>
> yes, it works with a capital 'C'.
>
> Should the constructor do
>    this.root = root.toLowerCase()?
>
> Or should the equals method do
>    root.toLowerCase().equals(other.root.toLowerCase())?
Well spotted by Roger, it seems we have a long standing bug here. As 
regards fixing this when we can re-purpose the existing bug or create a 
new one. toLowerCase is locale sensitive, it's more likely that it 
should be equalsIgnoreCase but I think needs a bit of study to ensure 
that this is correct for cases such as when the root directory is a UNC 
server.

-Alan


More information about the nio-dev mailing list