1.1 --- a/src/share/vm/classfile/javaClasses.hpp Fri Dec 07 16:08:05 2012 -0800 1.2 +++ b/src/share/vm/classfile/javaClasses.hpp Thu Dec 13 10:09:49 2012 +0100 1.3 @@ -166,8 +166,8 @@ 1.4 // objects in the shared archive file. 1.5 // hash P(31) from Kernighan & Ritchie 1.6 // 1.7 - // For this reason, THIS ALGORITHM MUST MATCH String.toHash(). 1.8 - template <typename T> static unsigned int to_hash(T* s, int len) { 1.9 + // For this reason, THIS ALGORITHM MUST MATCH String.hashCode(). 1.10 + template <typename T> static unsigned int hash_code(T* s, int len) { 1.11 unsigned int h = 0; 1.12 while (len-- > 0) { 1.13 h = 31*h + (unsigned int) *s; 1.14 @@ -175,10 +175,10 @@ 1.15 } 1.16 return h; 1.17 } 1.18 - static unsigned int to_hash(oop java_string); 1.19 + static unsigned int hash_code(oop java_string); 1.20 1.21 // This is the string hash code used by the StringTable, which may be 1.22 - // the same as String.toHash or an alternate hash code. 1.23 + // the same as String.hashCode or an alternate hash code. 1.24 static unsigned int hash_string(oop java_string); 1.25 1.26 static bool equals(oop java_string, jchar* chars, int len);