diff --git a/.hgtags b/.hgtags index a5351f1ccbc24856c371c4693e5b1e929d44692f..eae7692e8dc56cde223ac9d9a04981707e321d1c 100644 --- a/.hgtags +++ b/.hgtags @@ -899,3 +899,5 @@ ceecf88e5c2c09bfabf5926581e6d0b0f65f5148 jdk8u111-b00 e73d79ce00e4a0451e464c7a73d9c911d01e169a jdk8u111-b01 d584a614818562e1187e1a15c202aec01491caeb jdk8u111-b02 a3ede966ecfe6009fe4a58fbd6903c470a059ad3 jdk8u111-b03 +65029655928a834018a6793253c9b2699044af92 jdk8u111-b04 +3b0e5f01891f5ebbf67797b1aae786196f1bb4f6 jdk8u121-b00 diff --git a/src/share/vm/classfile/classFileParser.cpp b/src/share/vm/classfile/classFileParser.cpp index e2a64cd7638f555bc27e5d60ad25146f70a49f5a..23a0cecc6a439a73d7633c167fb7277972d6f21d 100644 --- a/src/share/vm/classfile/classFileParser.cpp +++ b/src/share/vm/classfile/classFileParser.cpp @@ -3969,6 +3969,11 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name, // Make sure this is the end of class file stream guarantee_property(cfs->at_eos(), "Extra bytes at the end of class file %s", CHECK_(nullHandle)); + if (_class_name == vmSymbols::java_lang_Object()) { + check_property(_local_interfaces == Universe::the_empty_klass_array(), + "java.lang.Object cannot implement an interface in class file %s", + CHECK_(nullHandle)); + } // We check super class after class file is parsed and format is checked if (super_class_index > 0 && super_klass.is_null()) { Symbol* sk = cp->klass_name_at(super_class_index); diff --git a/src/share/vm/prims/jvm.cpp b/src/share/vm/prims/jvm.cpp index 76886fbccc4caeac95ffe69e6bebdf1d8661d766..93ab79ef843af8fa042a129a246e10ed6ac3dfb4 100644 --- a/src/share/vm/prims/jvm.cpp +++ b/src/share/vm/prims/jvm.cpp @@ -2626,7 +2626,6 @@ JVM_ENTRY(const char*, JVM_GetCPMethodNameUTF(JNIEnv *env, jclass cls, jint cp_i switch (cp->tag_at(cp_index).value()) { case JVM_CONSTANT_InterfaceMethodref: case JVM_CONSTANT_Methodref: - case JVM_CONSTANT_NameAndType: // for invokedynamic return cp->uncached_name_ref_at(cp_index)->as_utf8(); default: fatal("JVM_GetCPMethodNameUTF: illegal constant"); @@ -2644,7 +2643,6 @@ JVM_ENTRY(const char*, JVM_GetCPMethodSignatureUTF(JNIEnv *env, jclass cls, jint switch (cp->tag_at(cp_index).value()) { case JVM_CONSTANT_InterfaceMethodref: case JVM_CONSTANT_Methodref: - case JVM_CONSTANT_NameAndType: // for invokedynamic return cp->uncached_signature_ref_at(cp_index)->as_utf8(); default: fatal("JVM_GetCPMethodSignatureUTF: illegal constant");