mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8266851: Implement JEP 403: Strongly Encapsulate JDK Internals
Co-authored-by: Alan Bateman <alanb@openjdk.org> Reviewed-by: mchung, alanb, hseigel
This commit is contained in:
parent
8c4719a588
commit
e63023546a
26 changed files with 50 additions and 2842 deletions
|
@ -28,7 +28,6 @@ package java.lang.invoke;
|
|||
import jdk.internal.access.SharedSecrets;
|
||||
import jdk.internal.misc.Unsafe;
|
||||
import jdk.internal.misc.VM;
|
||||
import jdk.internal.module.IllegalAccessLogger;
|
||||
import jdk.internal.org.objectweb.asm.ClassReader;
|
||||
import jdk.internal.org.objectweb.asm.Opcodes;
|
||||
import jdk.internal.org.objectweb.asm.Type;
|
||||
|
@ -262,13 +261,6 @@ public class MethodHandles {
|
|||
// M2 != M1, set previous lookup class to M1 and drop MODULE access
|
||||
newPreviousClass = callerClass;
|
||||
newModes &= ~Lookup.MODULE;
|
||||
|
||||
if (!callerModule.isNamed() && targetModule.isNamed()) {
|
||||
IllegalAccessLogger logger = IllegalAccessLogger.illegalAccessLogger();
|
||||
if (logger != null) {
|
||||
logger.logIfOpenedForIllegalAccess(caller, targetClass);
|
||||
}
|
||||
}
|
||||
}
|
||||
return Lookup.newLookup(targetClass, newPreviousClass, newModes);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue