RFR: 8191963: Path.equals() and File.equals() return true for two different files on Windows
Brian Burkhalter
bpb at openjdk.org
Mon Sep 29 21:45:06 UTC 2025
On Thu, 12 Jun 2025 21:12:53 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Replace logic in `java.io.WinNTFileSystems.compare(File,File)` with that from `sun.nio.fs.WindowsPath.compareTo(Path)`.
If this none too recent [MSFT blog entry](https://learn.microsoft.com/en-us/archive/blogs/greggm/comparing-file-names-in-native-code) is to be believed, `Path.equals` and the proposed changed version of `File.equals` match the behavior of the Windows operating system.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25788#issuecomment-3349153343
More information about the core-libs-dev
mailing list