changeset 53915:e6f52c533cbc

8214807: Improve handling of very old class files Summary: Remove old version specific code in reflection.cpp Reviewed-by: acorn, dholmes
author hseigel
date Thu, 06 Dec 2018 09:58:26 -0500
parents 9e041366c764
children 50a00bc8a0e2
files src/hotspot/share/classfile/verifier.hpp src/hotspot/share/runtime/reflection.cpp src/java.base/share/man/java.1
diffstat 3 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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,
--- 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() &&
--- 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\&.