< prev index next >
agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java
Print this page
*** 59,71 ****
// VM's Hashtable::hash_symbol
protected static long hashSymbol(byte[] buf) {
long h = 0;
int s = 0;
int len = buf.length;
- // Emulate the unsigned int in java_lang_String::hash_code
while (len-- > 0) {
! h = 31*h + (0xFFFFFFFFL & buf[s]);
s++;
}
return h & 0xFFFFFFFFL;
}
}
--- 59,70 ----
// VM's Hashtable::hash_symbol
protected static long hashSymbol(byte[] buf) {
long h = 0;
int s = 0;
int len = buf.length;
while (len-- > 0) {
! h = 31*h + (0xFFL & buf[s]);
s++;
}
return h & 0xFFFFFFFFL;
}
}
< prev index next >