src/hotspot/share/classfile/symbolTable.cpp
changeset 54133 829bf950287e
parent 53898 853b82a25d53
child 54347 235883996bc7
--- a/src/hotspot/share/classfile/symbolTable.cpp	Wed Mar 13 22:05:09 2019 -0700
+++ b/src/hotspot/share/classfile/symbolTable.cpp	Thu Mar 14 18:56:25 2019 +0100
@@ -487,8 +487,8 @@
   if (sym == NULL) {
     sym = SymbolTable::the_table()->do_add_if_needed(name, len, hash, false, CHECK_NULL);
   }
-  if (sym->refcount() != PERM_REFCOUNT) {
-    sym->increment_refcount();
+  if (!sym->is_permanent()) {
+    sym->make_permanent();
     log_trace_symboltable_helper(sym, "Asked for a permanent symbol, but got a regular one");
   }
   return sym;