Hacker News new | ask | show | jobs
Java HashMap.HashCode() Not Unique With String Keys And Values (codercowboy.com)
2 points by codercowboy 2802 days ago
1 comments

The HashMap docs say: “This class makes no guarantees as to the order of the map; in particular, it does not guarantee that the order will remain constant over time.” This utility function depends on the order of the entries, so it can return different hashes even when the keys and values in the map are the same.

https://docs.oracle.com/javase/8/docs/api/java/util/HashMap....