--- 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;
}