hotspot/src/share/vm/classfile/classFileParser.cpp
changeset 17024 49cbeca23983
parent 16692 b6d3c26b2192
child 17080 9151a26f5888
child 17379 fec16b38217a
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Wed Apr 17 08:20:02 2013 -0400
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Apr 18 08:05:35 2013 -0700
@@ -436,14 +436,19 @@
               ref_index, CHECK_(nullHandle));
             break;
           case JVM_REF_invokeVirtual:
-          case JVM_REF_invokeStatic:
-          case JVM_REF_invokeSpecial:
           case JVM_REF_newInvokeSpecial:
             check_property(
               tag.is_method(),
               "Invalid constant pool index %u in class file %s (not a method)",
               ref_index, CHECK_(nullHandle));
             break;
+          case JVM_REF_invokeStatic:
+          case JVM_REF_invokeSpecial:
+            check_property(
+               tag.is_method() || tag.is_interface_method(),
+               "Invalid constant pool index %u in class file %s (not a method)",
+               ref_index, CHECK_(nullHandle));
+             break;
           case JVM_REF_invokeInterface:
             check_property(
               tag.is_interface_method(),
@@ -3837,7 +3842,7 @@
     }
 
     if (TraceClassLoadingPreorder) {
-      tty->print("[Loading %s", name->as_klass_external_name());
+      tty->print("[Loading %s", (name != NULL) ? name->as_klass_external_name() : "NoName");
       if (cfs->source() != NULL) tty->print(" from %s", cfs->source());
       tty->print_cr("]");
     }