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
--- 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 {