Skip to content

Commit

Permalink
Fix SpEL generated code for default method invocation
Browse files Browse the repository at this point in the history
Closes gh-25706
  • Loading branch information
jhoeller committed Sep 5, 2020
1 parent 5f51728 commit c266c52
Showing 1 changed file with 4 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -351,8 +351,9 @@ public void generateCode(MethodVisitor mv, CodeFlow cf) {
}

generateCodeForArguments(mv, cf, method, this.children);
mv.visitMethodInsn((isStaticMethod ? INVOKESTATIC : INVOKEVIRTUAL), classDesc, method.getName(),
CodeFlow.createSignatureDescriptor(method), method.getDeclaringClass().isInterface());
mv.visitMethodInsn((isStaticMethod ? INVOKESTATIC : (method.isDefault() ? INVOKEINTERFACE : INVOKEVIRTUAL)),
classDesc, method.getName(), CodeFlow.createSignatureDescriptor(method),
method.getDeclaringClass().isInterface());
cf.pushDescriptor(this.exitTypeDescriptor);

if (this.originalPrimitiveExitTypeDescriptor != null) {
Expand Down

0 comments on commit c266c52

Please sign in to comment.