changeset 55827:5e637f790bb8

8228671: Fastdebug VM throws InternalError when publicLookup.in(T) is used to resolve a member Reviewed-by: alanb
author mchung
date Sat, 27 Jul 2019 14:49:16 -0700
parents 02cffb476ab0
children 9af2749af9fc
files src/java.base/share/classes/java/lang/invoke/MethodHandles.java
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Fri Jul 26 23:37:51 2019 -0400
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Sat Jul 27 14:49:16 2019 -0700
@@ -1329,7 +1329,14 @@
 
         // This is just for calling out to MethodHandleImpl.
         private Class<?> lookupClassOrNull() {
-            return (allowedModes == TRUSTED) ? null : lookupClass;
+            if (allowedModes == TRUSTED) {
+                return null;
+            }
+            if (allowedModes == UNCONDITIONAL) {
+                // use Object as the caller to pass to VM doing resolution
+                return Object.class;
+            }
+            return lookupClass;
         }
 
         /** Tells which access-protection classes of members this lookup object can produce.