8195744: Avoid calling ClassLoader.checkPackageAccess if security manager is not installed

Reviewed-by: dholmes, iklam
This commit is contained in:
Coleen Phillimore 2021-02-08 21:31:25 +00:00
parent ab65d53edf
commit ace8f94616
8 changed files with 131 additions and 82 deletions

View file

@ -1372,11 +1372,15 @@ class java_lang_System : AllStatic {
static int _static_out_offset;
static int _static_err_offset;
static int _static_security_offset;
static int _static_allow_security_offset;
static int _static_never_offset;
public:
static int in_offset() { CHECK_INIT(_static_in_offset); }
static int out_offset() { CHECK_INIT(_static_out_offset); }
static int err_offset() { CHECK_INIT(_static_err_offset); }
static bool allow_security_manager();
static bool has_security_manager();
static void compute_offsets();
static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;