8135206: VM permits illegal flags for abstract methods in interfaces, versions 45.3 - 51.0
authorhseigel
Tue, 02 Feb 2016 08:27:40 -0500
changeset 35911 80dd27ae501c
parent 35906 1eed370d39f9
child 35912 679f5181ef91
8135206: VM permits illegal flags for abstract methods in interfaces, versions 45.3 - 51.0 Summary: Add additional method flag checks Reviewed-by: jiangli, minqi
hotspot/src/share/vm/classfile/classFileParser.cpp
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Tue Feb 02 05:38:33 2016 -0500
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Tue Feb 02 08:27:40 2016 -0500
@@ -4602,8 +4602,8 @@
       }
     } else if (major_gte_15) {
       // Class file version in the interval [JAVA_1_5_VERSION, JAVA_8_VERSION)
-      if (!is_public || is_static || is_final || is_synchronized ||
-          is_native || !is_abstract || is_strict) {
+      if (!is_public || is_private || is_protected || is_static || is_final ||
+          is_synchronized || is_native || !is_abstract || is_strict) {
         is_illegal = true;
       }
     } else {