hotspot/src/share/vm/classfile/classFileParser.cpp
changeset 33230 23bb11a5cf4e
parent 33198 b37ad9fbf681
parent 33207 edc4431940b2
child 33589 7cbd1b2c139b
child 33593 60764a78fa5c
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Mon Oct 19 12:30:17 2015 -0700
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Tue Oct 20 11:17:19 2015 -0400
@@ -2003,6 +2003,10 @@
     verify_legal_method_modifiers(flags, is_interface, name, CHECK_(nullHandle));
   }
 
+  if (name == vmSymbols::object_initializer_name() && is_interface) {
+    classfile_parse_error("Interface cannot have a method named <init>, class file %s", CHECK_(nullHandle));
+  }
+
   int args_size = -1;  // only used when _need_verify is true
   if (_need_verify) {
     args_size = ((flags & JVM_ACC_STATIC) ? 0 : 1) +