changeset 6505:7c9a589bb8e0

8159503: Amend Annotation Actions Reviewed-by: rprotacio
author poonam
date Fri, 14 Oct 2016 03:13:25 +0100
parents 80cb3596bc5a
children c3cbf99ff52b
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
@@ -3219,6 +3219,11 @@
     // 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_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);