8219774: Reexamine the initialization of LangReflectAccess shared secret at AccessibleObject::<clinit>

Reviewed-by: alanb
This commit is contained in:
Mandy Chung 2019-07-23 20:03:03 -07:00
parent 94c38c4cc1
commit 203db2596f
10 changed files with 65 additions and 205 deletions

View file

@ -25,10 +25,7 @@
package java.lang.reflect;
import java.security.AccessController;
import java.util.StringJoiner;
import jdk.internal.reflect.LangReflectAccess;
import jdk.internal.reflect.ReflectionFactory;
/**
* The Modifier class provides {@code static} methods and
@ -47,16 +44,6 @@ import jdk.internal.reflect.ReflectionFactory;
*/
public class Modifier {
/*
* Bootstrapping protocol between java.lang and java.lang.reflect
* packages
*/
static {
ReflectionFactory factory = AccessController.doPrivileged(
new ReflectionFactory.GetReflectionFactoryAction());
factory.setLangReflectAccess(new java.lang.reflect.ReflectAccess());
}
/**
* Return {@code true} if the integer argument includes the
* {@code public} modifier, {@code false} otherwise.