< prev index next >

src/hotspot/share/classfile/symbolTable.cpp

Print this page

        

*** 210,222 **** int count = 0; for (HashtableEntry<Symbol*, mtSymbol>* e = bucket(index); e != NULL; e = e->next()) { count++; // count all entries in this bucket, not just ones with same hash if (e->hash() == hash) { Symbol* sym = e->literal(); ! if (sym->equals(name, len)) { // something is referencing this symbol now. - sym->increment_refcount(); return sym; } } } // If the bucket size is too deep check if this hash code is insufficient. --- 210,221 ---- int count = 0; for (HashtableEntry<Symbol*, mtSymbol>* e = bucket(index); e != NULL; e = e->next()) { count++; // count all entries in this bucket, not just ones with same hash if (e->hash() == hash) { Symbol* sym = e->literal(); ! if (sym->equals(name, len) && sym->try_increment_refcount()) { // something is referencing this symbol now. return sym; } } } // If the bucket size is too deep check if this hash code is insufficient.
< prev index next >