diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Def.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Def.java index c2dd960d159..e8c682a2034 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Def.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Def.java @@ -220,7 +220,8 @@ public final class Def { * @throws LambdaConversionException if a method reference cannot be converted to an functional interface * @throws IllegalArgumentException if no matching whitelisted method was found. */ - static MethodHandle lookupMethod(MethodHandles.Lookup lookup, Class receiverClass, String name, Object args[], long recipe) throws LambdaConversionException { + static MethodHandle lookupMethod(Lookup lookup, Class receiverClass, String name, + Object args[], long recipe) throws LambdaConversionException { Method method = lookupMethodInternal(receiverClass, name, args.length - 1); MethodHandle handle = method.handle; @@ -241,7 +242,7 @@ public final class Def { /** Returns a method handle to an implementation of clazz, given method reference signature * @throws LambdaConversionException if a method reference cannot be converted to an functional interface */ - private static MethodHandle lookupReference(MethodHandles.Lookup lookup, Class clazz, String signature) throws LambdaConversionException { + private static MethodHandle lookupReference(Lookup lookup, Class clazz, String signature) throws LambdaConversionException { int separator = signature.indexOf('.'); FunctionRef ref = new FunctionRef(clazz, signature.substring(0, separator), signature.substring(separator+1)); final CallSite callSite; diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/DefBootstrap.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/DefBootstrap.java index 7318a0b65e3..5dc773672a7 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/DefBootstrap.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/DefBootstrap.java @@ -68,13 +68,13 @@ public final class DefBootstrap { /** maximum number of types before we go megamorphic */ static final int MAX_DEPTH = 5; - private final MethodHandles.Lookup lookup; + private final Lookup lookup; private final String name; private final int flavor; private final long recipe; int depth; // pkg-protected for testing - PIC(MethodHandles.Lookup lookup, String name, MethodType type, int flavor, long recipe) { + PIC(Lookup lookup, String name, MethodType type, int flavor, long recipe) { super(type); this.lookup = lookup; this.name = name;