changeset 52106:fc52ccf451cd

8211921: AssertionError in MethodHandles$Lookup.defineClass Reviewed-by: alanb
author mchung
date Wed, 10 Oct 2018 15:19:34 -0700
parents 26c3104c936d
children a36ee8e96c1e
files src/java.base/share/classes/java/lang/invoke/MethodHandles.java
diffstat 1 files changed, 0 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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;
         }