# HG changeset patch # User bharadwaj # Date 1365522752 25200 # Node ID 09b0d3e9ba6cdf7da07d4010d2d1df14596f6864 # Parent b933e75e7cbe3661b1ccdb0d134de4fe34905a98 8011671: JCK tests on static interface methods fail under b84: Illegal type at constant pool entry 5 Summary: Restore incorrect removal of support for static interface method verification in Java 8 Reviewed-by: kvn, coleenp diff -r b933e75e7cbe -r 09b0d3e9ba6c src/share/vm/classfile/verifier.cpp --- a/src/share/vm/classfile/verifier.cpp Fri Apr 05 23:10:04 2013 -0700 +++ b/src/share/vm/classfile/verifier.cpp Tue Apr 09 08:52:32 2013 -0700 @@ -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 @@ 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; }