# HG changeset patch # User redestad # Date 1571838491 -7200 # Node ID b7aa58d7f5aa778a97b86efec2c5b5fa1af44150 # Parent f67f4674b466acddf33ab2169bf2a66112e3d3c5 8232887: Remove SystemDictionary::has_checkPackageAccess Reviewed-by: coleenp, lfoltan diff -r f67f4674b466 -r b7aa58d7f5aa src/hotspot/share/classfile/dictionary.hpp --- a/src/hotspot/share/classfile/dictionary.hpp Wed Oct 23 05:48:17 2019 -0700 +++ b/src/hotspot/share/classfile/dictionary.hpp Wed Oct 23 15:48:11 2019 +0200 @@ -156,7 +156,6 @@ // Tells whether the initiating class' protection domain can access the klass in this entry bool is_valid_protection_domain(Handle protection_domain) { if (!ProtectionDomainVerification) return true; - if (!SystemDictionary::has_checkPackageAccess()) return true; return protection_domain() == NULL ? true diff -r f67f4674b466 -r b7aa58d7f5aa src/hotspot/share/classfile/systemDictionary.cpp --- a/src/hotspot/share/classfile/systemDictionary.cpp Wed Oct 23 05:48:17 2019 -0700 +++ b/src/hotspot/share/classfile/systemDictionary.cpp Wed Oct 23 15:48:11 2019 +0200 @@ -109,8 +109,6 @@ oop SystemDictionary::_java_system_loader = NULL; oop SystemDictionary::_java_platform_loader = NULL; -bool SystemDictionary::_has_checkPackageAccess = false; - // Default ProtectionDomainCacheSize value const int defaultProtectionDomainCacheSize = 1009; @@ -447,8 +445,6 @@ Handle class_loader, Handle protection_domain, TRAPS) { - if(!has_checkPackageAccess()) return; - // Now we have to call back to java to check if the initating class has access JavaValue result(T_VOID); LogTarget(Debug, protectiondomain) lt; @@ -2021,11 +2017,6 @@ //_box_klasses[T_OBJECT] = WK_KLASS(object_klass); //_box_klasses[T_ARRAY] = WK_KLASS(object_klass); - { // Compute whether we should use checkPackageAccess or NOT - Method* method = InstanceKlass::cast(ClassLoader_klass())->find_method(vmSymbols::checkPackageAccess_name(), vmSymbols::class_protectiondomain_signature()); - _has_checkPackageAccess = (method != NULL); - } - #ifdef ASSERT if (UseSharedSpaces) { assert(JvmtiExport::is_early_phase(), diff -r f67f4674b466 -r b7aa58d7f5aa src/hotspot/share/classfile/systemDictionary.hpp --- a/src/hotspot/share/classfile/systemDictionary.hpp Wed Oct 23 05:48:17 2019 -0700 +++ b/src/hotspot/share/classfile/systemDictionary.hpp Wed Oct 23 15:48:11 2019 +0200 @@ -430,9 +430,6 @@ } public: - // Tells whether ClassLoader.checkPackageAccess is present - static bool has_checkPackageAccess() { return _has_checkPackageAccess; } - static bool Parameter_klass_loaded() { return WK_KLASS(reflect_Parameter_klass) != NULL; } static bool Class_klass_loaded() { return WK_KLASS(Class_klass) != NULL; } static bool Cloneable_klass_loaded() { return WK_KLASS(Cloneable_klass) != NULL; } @@ -667,8 +664,6 @@ static oop _java_system_loader; static oop _java_platform_loader; - static bool _has_checkPackageAccess; - public: static TableStatistics placeholders_statistics(); static TableStatistics loader_constraints_statistics();