8159503: Amend Annotation Actions
Reviewed-by: coleenp, hseigel, mschoene, acorn, ctornqvi
Contributed-by: rachel.protacio@oracle.com
--- 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);