RFR: 8365626: (fs) Improve handling of broken links in Files.isSameFile() (win)

Brian Burkhalter bpb at openjdk.org
Thu Sep 4 15:34:46 UTC 2025


On Thu, 4 Sep 2025 09:44:01 GMT, Francesco Andreuzzi <duke at openjdk.org> wrote:

> Should we combine these values with something more complex than a sum to reduce potential collisions?

This method is there mainly to silence the compilation warning about overriding `equals` while not overriding `hashCode`. Overriding `equals` was necessary for detecting a file system loop (cycle). This class is package scope and I don't think that `hashCode` will ever be used.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27079#discussion_r2322570264


More information about the nio-dev mailing list