8159503: Amend Annotation Actions
authorrprotacio
Fri, 01 Jul 2016 15:11:38 -0400
changeset 41544 d77997d3a28b
parent 41543 92f720daf12d
child 41545 45a3f587a838
8159503: Amend Annotation Actions Reviewed-by: coleenp, hseigel, mschoene, acorn, ctornqvi Contributed-by: rachel.protacio@oracle.com
hotspot/src/share/vm/classfile/classFileParser.cpp
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Fri Jul 01 09:33:34 2016 +0200
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Fri Jul 01 15:11:38 2016 -0400
@@ -5859,6 +5859,11 @@
   assert(cp != NULL, "invariant");
   assert(_loader_data != NULL, "invariant");
 
+  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);
+  }
   // We check super class after class file is parsed and format is checked
   if (_super_class_index > 0 && NULL ==_super_klass) {
     Symbol* const super_class_name = cp->klass_name_at(_super_class_index);