# HG changeset patch # User jiangli # Date 1502835200 14400 # Node ID f64eb2bfb250e7a4510d488e10bd3ed904b7e6ad # Parent 7dad333205cda112d6a41b4dfa99ef3cbe4d69bf 8186238: The constant pool entry to empty string ("") should not be pre-resolved during CDS dump time. Summary: Skip constant pool entry to empty string during pre-resolving at CDS dump time. Reviewed-by: iklam, dcubed diff -r 7dad333205cd -r f64eb2bfb250 hotspot/src/share/vm/oops/constantPool.cpp --- 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