src/java.base/share/classes/java/lang/invoke/MethodHandles.java
changeset 57558 5e637f790bb8
parent 57512 f557f260b787
child 57735 7ba5e49258de
equal deleted inserted replaced
57551:02cffb476ab0 57558:5e637f790bb8
  1327             return prevLookupClass;
  1327             return prevLookupClass;
  1328         }
  1328         }
  1329 
  1329 
  1330         // This is just for calling out to MethodHandleImpl.
  1330         // This is just for calling out to MethodHandleImpl.
  1331         private Class<?> lookupClassOrNull() {
  1331         private Class<?> lookupClassOrNull() {
  1332             return (allowedModes == TRUSTED) ? null : lookupClass;
  1332             if (allowedModes == TRUSTED) {
       
  1333                 return null;
       
  1334             }
       
  1335             if (allowedModes == UNCONDITIONAL) {
       
  1336                 // use Object as the caller to pass to VM doing resolution
       
  1337                 return Object.class;
       
  1338             }
       
  1339             return lookupClass;
  1333         }
  1340         }
  1334 
  1341 
  1335         /** Tells which access-protection classes of members this lookup object can produce.
  1342         /** Tells which access-protection classes of members this lookup object can produce.
  1336          *  The result is a bit-mask of the bits
  1343          *  The result is a bit-mask of the bits
  1337          *  {@linkplain #PUBLIC PUBLIC (0x01)},
  1344          *  {@linkplain #PUBLIC PUBLIC (0x01)},