mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8219774: Reexamine the initialization of LangReflectAccess shared secret at AccessibleObject::<clinit>
Reviewed-by: alanb
This commit is contained in:
parent
94c38c4cc1
commit
203db2596f
10 changed files with 65 additions and 205 deletions
|
@ -30,6 +30,7 @@ import java.lang.invoke.MethodHandle;
|
|||
import java.lang.ref.WeakReference;
|
||||
import java.security.AccessController;
|
||||
|
||||
import jdk.internal.access.SharedSecrets;
|
||||
import jdk.internal.misc.VM;
|
||||
import jdk.internal.module.IllegalAccessLogger;
|
||||
import jdk.internal.reflect.CallerSensitive;
|
||||
|
@ -77,6 +78,10 @@ import sun.security.util.SecurityConstants;
|
|||
* @spec JPMS
|
||||
*/
|
||||
public class AccessibleObject implements AnnotatedElement {
|
||||
static {
|
||||
// AccessibleObject is initialized early in initPhase1
|
||||
SharedSecrets.setJavaLangReflectAccess(new ReflectAccess());
|
||||
}
|
||||
|
||||
static void checkPermission() {
|
||||
SecurityManager sm = System.getSecurityManager();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue