Is it likely that Oracle will ever change the way Java computes hash codes for java.lang.String’s?
I’m making an optimization that relies on the way hash codes are computed for strings, as per the java docs
s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]
http://download.oracle.com/javase/6/docs/api/java/lang/String.html#hashCode()
The JavaDocs specify the interface just as much as the methods themselves. You can rely on it staying this way.