< prev index next >

src/java.base/share/classes/java/lang/invoke/MethodHandles.java

Print this page
rev 15107 : 8161379: Force inline methods calling Reflection.getCallerClass
Reviewed-by: TBD

@@ -27,10 +27,11 @@
 
 import jdk.internal.org.objectweb.asm.ClassWriter;
 import jdk.internal.org.objectweb.asm.Opcodes;
 import jdk.internal.reflect.CallerSensitive;
 import jdk.internal.reflect.Reflection;
+import jdk.internal.vm.annotation.ForceInline;
 import sun.invoke.util.ValueConversions;
 import sun.invoke.util.VerifyAccess;
 import sun.invoke.util.Wrapper;
 import sun.reflect.misc.ReflectUtil;
 import sun.security.util.SecurityConstants;

@@ -102,10 +103,11 @@
      * <a href="package-summary.html#indyinsn">invokedynamic instruction</a>
      * executing in the same caller class {@code C}.
      * @return a lookup object for the caller of this method, with private access
      */
     @CallerSensitive
+    @ForceInline
     public static Lookup lookup() {
         return new Lookup(Reflection.getCallerClass());
     }
 
     /**
< prev index next >