< prev index next >


Print this page


@@ -41,10 +41,11 @@
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.PropertyPermission;
 import java.util.Set;
 import static java.lang.invoke.MethodHandles.Lookup.ClassOption.NESTMATE;
+import static java.lang.invoke.MethodHandles.Lookup.ClassOption.STRONG;
 import static jdk.internal.org.objectweb.asm.Opcodes.*;
  * Lambda metafactory implementation which dynamically creates an
  * inner-class-like class per lambda callsite.

@@ -345,11 +346,11 @@
             // createDirectories may need it
             new PropertyPermission("user.dir", "read"));
         try {
             // this class is linked at the indy callsite; so define a hidden nestmate
-            Lookup lookup = caller.defineHiddenClass(classBytes, !disableEagerInitialization, NESTMATE);
+            Lookup lookup = caller.defineHiddenClass(classBytes, !disableEagerInitialization, NESTMATE, STRONG);
             if (useImplMethodHandle) {
                 // If the target class invokes a method reference this::m which is
                 // resolved to a protected method inherited from a superclass in a different
                 // package, the target class does not have a bridge and this method reference
                 // has been changed from public to protected after the target class was compiled.
< prev index next >