Consistency of hashCode() on a Java string
I can see that documentation as far back as Java 1.2. While it’s true that in general you shouldn’t rely on a hash code implementation remaining the same, it’s now documented behaviour for java.lang.String, so changing it would count as breaking existing contracts. Wherever possible, you shouldn’t rely on hash codes staying the same across … Read more