hotspot/src/share/vm/oops/constantPool.cpp
changeset 46816 f64eb2bfb250
parent 46810 7dad333205cd
child 46961 c9094b1e5f87
--- a/hotspot/src/share/vm/oops/constantPool.cpp	Mon Aug 14 14:32:17 2017 -0400
+++ b/hotspot/src/share/vm/oops/constantPool.cpp	Tue Aug 15 18:13:20 2017 -0400
@@ -264,7 +264,9 @@
       oop p = rr->obj_at(i);
       if (p != NULL) {
         int index = object_to_cp_index(i);
-        if (tag_at(index).is_string()) {
+        // Skip the entry if the string hash code is 0 since the string
+        // is not included in the shared string_table, see StringTable::copy_shared_string.
+        if (tag_at(index).is_string() && java_lang_String::hash_code(p) != 0) {
           oop op = StringTable::create_archived_string(p, THREAD);
           // If the String object is not archived (possibly too large),
           // NULL is returned. Also set it in the array, so we won't