Fix SpEL generated code for default method invocation

Closes gh-25706
This commit is contained in:
Andy Clement
2020-09-04 22:19:17 -07:00
parent 4044f4c30f
commit a404bf5a94
3 changed files with 61 additions and 2 deletions

View File

@@ -347,7 +347,8 @@ public class MethodReference extends SpelNodeImpl {
}
generateCodeForArguments(mv, cf, method, this.children);
mv.visitMethodInsn((isStaticMethod ? INVOKESTATIC : INVOKEVIRTUAL), classDesc, method.getName(),
mv.visitMethodInsn((isStaticMethod ? INVOKESTATIC : (method.isDefault() ? INVOKEINTERFACE : INVOKEVIRTUAL)),
classDesc, method.getName(),
CodeFlow.createSignatureDescriptor(method), method.getDeclaringClass().isInterface());
cf.pushDescriptor(this.exitTypeDescriptor);