< prev index next >
src/share/vm/oops/symbol.cpp
Print this page
*** 33,43 ****
#include "runtime/os.hpp"
Symbol::Symbol(const u1* name, int length, int refcount) {
_refcount = refcount;
_length = length;
! _identity_hash = os::random();
for (int i = 0; i < _length; i++) {
byte_at_put(i, name[i]);
}
}
--- 33,43 ----
#include "runtime/os.hpp"
Symbol::Symbol(const u1* name, int length, int refcount) {
_refcount = refcount;
_length = length;
! _identity_hash = (short)os::random();
for (int i = 0; i < _length; i++) {
byte_at_put(i, name[i]);
}
}
< prev index next >