diff options
-rw-r--r-- | loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java index c4c1ba3ae..f67b0f3ad 100644 --- a/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java +++ b/loadtime/src/org/aspectj/weaver/loadtime/ClassLoaderWeavingAdaptor.java @@ -1054,11 +1054,11 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { private static synchronized void initializeForJava11() { if (initializedForJava11) return; try { - // MethodType defineClassMethodType = MethodType.methodType(Class.class, new Class[]{String.class, byte[].class, int.class, int.class}); + // MethodType defineClassMethodType = MethodType.methodType(Class.class, new Class[]{String.class, byte[].class, int.class, int.class, ProtectionDomain.class}); Class<?> methodType_Class = Class.forName("java.lang.invoke.MethodType"); Method methodTypeMethodOnMethodTypeClass = methodType_Class.getDeclaredMethod("methodType", Class.class,Class[].class); methodTypeMethodOnMethodTypeClass.setAccessible(true); - Object defineClassMethodType = methodTypeMethodOnMethodTypeClass.invoke(null, Class.class, new Class[] {String.class,byte[].class,int.class,int.class}); + Object defineClassMethodType = methodTypeMethodOnMethodTypeClass.invoke(null, Class.class, new Class[] {String.class,byte[].class,int.class,int.class,ProtectionDomain.class}); // MethodHandles.Lookup methodHandlesLookup = MethodHandles.lookup(); Class<?> methodHandles_Class = Class.forName("java.lang.invoke.MethodHandles"); @@ -1099,9 +1099,9 @@ public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { if (!initializedForJava11) { initializeForJava11(); } - // Do this: clazz = defineClassMethodHandle.bindTo(loader).invokeWithArguments(name, bytes, 0, bytes.length); + // Do this: clazz = defineClassMethodHandle.bindTo(loader).invokeWithArguments(name, bytes, 0, bytes.length, protectionDomain); Object o = bindTo_Method.invoke(defineClassMethodHandle,loader); - clazz = invokeWithArguments_Method.invoke(o, new Object[] {new Object[] {name, bytes, 0, bytes.length}}); + clazz = invokeWithArguments_Method.invoke(o, new Object[] {new Object[] {name, bytes, 0, bytes.length, protectionDomain}}); } catch (Throwable t) { t.printStackTrace(System.err); |