src/share/vm/classfile/classFileParser.cpp

Print this page

        

@@ -404,10 +404,15 @@
           int string_index = cp->string_index_at(index);
           check_property(valid_symbol_at(string_index),
                  "Invalid constant pool index %u in class file %s",
                  string_index, CHECK_(nullHandle));
           Symbol* sym = cp->symbol_at(string_index);
+          const char* CPH = "CONSTANT_PLACEHOLDER_";
+          if (sym != NULL && strncmp(sym->as_utf8(), CPH, strlen(CPH)) == 0) {
+            // Save the Utf8 index of pseudo-string for JvmtiConstantPoolReconstituter
+            cp->map_pseudo_string_indices((u2)index, (u2)string_index);
+          }
           cp->unresolved_string_at_put(index, sym);
         }
         break;
       case JVM_CONSTANT_MethodHandle :
         {