aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbharadwaj <none@none>2013-04-09 08:52:32 -0700
committerbharadwaj <none@none>2013-04-09 08:52:32 -0700
commitdbef52a69ea45a9c127cf7c6befc5cac2f1fa257 (patch)
treeb45afc1a4b7b40a980b41e7a540b4f4f18f9d133
parent8bbcfbb76396050c575cf91a2e967a9a65c5f0d4 (diff)
8011671: JCK tests on static interface methods fail under b84: Illegal type at constant pool entry 5hs25-b27
Summary: Restore incorrect removal of support for static interface method verification in Java 8 Reviewed-by: kvn, coleenp
-rw-r--r--src/share/vm/classfile/verifier.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/share/vm/classfile/verifier.cpp b/src/share/vm/classfile/verifier.cpp
index f5261c5a6..fda30acd1 100644
--- a/src/share/vm/classfile/verifier.cpp
+++ b/src/share/vm/classfile/verifier.cpp
@@ -63,6 +63,7 @@
#define NOFAILOVER_MAJOR_VERSION 51
#define NONZERO_PADDING_BYTES_IN_SWITCH_MAJOR_VERSION 51
+#define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION 52
// Access to external entry for VerifyClassCodes - old byte code verifier
@@ -2320,6 +2321,11 @@ void ClassVerifier::verify_invoke_instructions(
types = (1 << JVM_CONSTANT_InterfaceMethodref) |
(1 << JVM_CONSTANT_Methodref);
break;
+ case Bytecodes::_invokestatic:
+ types = (_klass->major_version() < STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION) ?
+ (1 << JVM_CONSTANT_Methodref) :
+ ((1 << JVM_CONSTANT_InterfaceMethodref) | (1 << JVM_CONSTANT_Methodref));
+ break;
default:
types = 1 << JVM_CONSTANT_Methodref;
}