changeset 4133:6686cfcf4aa1

8159503: Amend Annotation Actions Reviewed-by: rprotacio
author poonam
date Fri, 14 Oct 2016 03:13:25 +0100
parents ecd56b400ef3
children ead8152d9341
files src/share/vm/classfile/classFileParser.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp	Thu Jun 30 23:08:42 2016 +0300
+++ b/src/share/vm/classfile/classFileParser.cpp	Fri Oct 14 03:13:25 2016 +0100
@@ -2914,6 +2914,11 @@
     objArrayHandle methods_parameter_annotations(THREAD, methods_parameter_annotations_oop);
     objArrayHandle methods_default_annotations(THREAD, methods_default_annotations_oop);
 
+    if (_class_name == vmSymbols::java_lang_Object()) {
+      check_property(local_interfaces == Universe::the_empty_system_obj_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);