fix: allow altMetafactory method in lambda call site (#1760)

This commit is contained in:
Skylot
2023-01-15 16:08:34 +00:00
parent df38a6424f
commit 068e4b8e3d
@@ -39,13 +39,11 @@ public class CustomLambdaCall {
return false;
}
IMethodRef methodRef = methodHandle.getMethodRef();
if (!methodRef.getName().equals("metafactory")) {
return false;
}
if (!methodRef.getParentClassType().equals("Ljava/lang/invoke/LambdaMetafactory;")) {
return false;
}
return true;
String mthName = methodRef.getName();
return mthName.equals("metafactory") || mthName.equals("altMetafactory");
}
public static InvokeCustomNode buildLambdaMethodCall(MethodNode mth, InsnData insn, boolean isRange, List<EncodedValue> values) {