8211921: AssertionError in MethodHandles$Lookup.defineClass
authormchung
Wed, 10 Oct 2018 15:19:34 -0700
changeset 52086 fc52ccf451cd
parent 52085 26c3104c936d
child 52087 a36ee8e96c1e
8211921: AssertionError in MethodHandles$Lookup.defineClass Reviewed-by: alanb
src/java.base/share/classes/java/lang/invoke/MethodHandles.java
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Fri Oct 05 05:03:15 2018 -0700
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Wed Oct 10 15:19:34 2018 -0700
@@ -969,9 +969,6 @@
             ProtectionDomain pd = (loader != null) ? lookupClassProtectionDomain() : null;
             String source = "__Lookup_defineClass__";
             Class<?> clazz = SharedSecrets.getJavaLangAccess().defineClass(loader, cn, bytes, pd, source);
-            assert clazz.getClassLoader() == lookupClass.getClassLoader()
-                    && clazz.getPackageName().equals(lookupClass.getPackageName())
-                    && protectionDomain(clazz) == lookupClassProtectionDomain();
             return clazz;
         }