# HG changeset patch # User hseigel # Date 1544108306 18000 # Node ID e6f52c533cbc33190bcbe0f280bb8cdf5a6e0aa5 # Parent 9e041366c764ab1f604451af5f0818513cb38063 8214807: Improve handling of very old class files Summary: Remove old version specific code in reflection.cpp Reviewed-by: acorn, dholmes diff -r 9e041366c764 -r e6f52c533cbc src/hotspot/share/classfile/verifier.hpp --- a/src/hotspot/share/classfile/verifier.hpp Thu Dec 06 15:44:40 2018 +0100 +++ b/src/hotspot/share/classfile/verifier.hpp Thu Dec 06 09:58:26 2018 -0500 @@ -36,7 +36,6 @@ class Verifier : AllStatic { public: enum { - STRICTER_ACCESS_CTRL_CHECK_VERSION = 49, STACKMAP_ATTRIBUTE_MAJOR_VERSION = 50, INVOKEDYNAMIC_MAJOR_VERSION = 51, NO_RELAX_ACCESS_CTRL_CHECK_VERSION = 52, diff -r 9e041366c764 -r e6f52c533cbc src/hotspot/share/runtime/reflection.cpp --- a/src/hotspot/share/runtime/reflection.cpp Thu Dec 06 15:44:40 2018 +0100 +++ b/src/hotspot/share/runtime/reflection.cpp Thu Dec 06 09:58:26 2018 -0500 @@ -417,11 +417,9 @@ under_unsafe_anonymous_host(accessee_ik, accessor_ik)) return true; - if ((RelaxAccessControlCheck && + if (RelaxAccessControlCheck && accessor_ik->major_version() < Verifier::NO_RELAX_ACCESS_CTRL_CHECK_VERSION && - accessee_ik->major_version() < Verifier::NO_RELAX_ACCESS_CTRL_CHECK_VERSION) || - (accessor_ik->major_version() < Verifier::STRICTER_ACCESS_CTRL_CHECK_VERSION && - accessee_ik->major_version() < Verifier::STRICTER_ACCESS_CTRL_CHECK_VERSION)) { + accessee_ik->major_version() < Verifier::NO_RELAX_ACCESS_CTRL_CHECK_VERSION) { return classloader_only && Verifier::relax_access_for(accessor_ik->class_loader()) && accessor_ik->protection_domain() == accessee_ik->protection_domain() && diff -r 9e041366c764 -r e6f52c533cbc src/java.base/share/man/java.1 --- a/src/java.base/share/man/java.1 Thu Dec 06 15:44:40 2018 +0100 +++ b/src/java.base/share/man/java.1 Thu Dec 06 09:58:26 2018 -0500 @@ -1396,11 +1396,6 @@ \fB\-XX:NativeMemoryTracking\fR)\&. By default, this option is disabled and native memory tracking data is not printed\&. .RE .PP -\-XX:+RelaxAccessControlCheck -.RS 4 -Decreases the amount of access control checks in the verifier\&. By default, this option is disabled, and it is ignored (that is, treated as disabled) for classes with a recent bytecode version\&. You can enable it for classes with older versions of the bytecode\&. -.RE -.PP \-XX:+ShowMessageBoxOnError .RS 4 Enables displaying of a dialog box when the JVM experiences an irrecoverable error\&. This prevents the JVM from exiting and keeps the process active so that you can attach a debugger to it to investigate the cause of the error\&. By default, this option is disabled\&.