diff -Nru openjdk.orig/hotspot/src/share/vm/interpreter/linkResolver.cpp openjdk/hotspot/src/share/vm/interpreter/linkResolver.cpp --- openjdk.orig/hotspot/src/share/vm/interpreter/linkResolver.cpp 2011-11-14 22:07:35.000000000 +0000 +++ hotspot/src/share/vm/interpreter/linkResolver.cpp 2013-02-01 21:46:24.084475305 +0000 @@ -695,7 +695,7 @@ if (check_access && // a) check if ACC_SUPER flag is set for the current class - current_klass->is_super() && + (current_klass->is_super() || !AllowNonVirtualCalls) && // b) check if the method class is a superclass of the current class (superclass relation is not reflexive!) current_klass->is_subtype_of(method_klass()) && current_klass() != method_klass() && // c) check if the method is not diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp openjdk/hotspot/src/share/vm/runtime/globals.hpp --- openjdk.orig/hotspot/src/share/vm/runtime/globals.hpp 2013-02-01 21:44:12.678449777 +0000 +++ hotspot/src/share/vm/runtime/globals.hpp 2013-02-01 21:46:57.300987338 +0000 @@ -3700,7 +3700,10 @@ product(bool, UseVMInterruptibleIO, false, \ "(Unstable, Solaris-specific) Thread interrupt before or with " \ "EINTR for I/O operations results in OS_INTRPT. The default value"\ - " of this flag is true for JDK 6 and earliers") + " of this flag is true for JDK 6 and earlier") \ + \ + product(bool, AllowNonVirtualCalls, false, \ + "Obey the ACC_SUPER flag and allow invokenonvirtual calls") /* * Macros for factoring of globals