Indicate whether target of generated call is an interface
The old method is deprecated and doesn't generate the correct
bytecode when invoking default interface methods.
This breaks with Java 9's stricter bytecode validation with a
"must be InterfaceMethodref constant" error.
@@ -357,7 +357,7 @@ public class InvokeInstruction
@Override
public void accept(MethodVisitor visitor, MethodGenerationContext generationContext)
{
- visitor.visitMethodInsn(opCode.getOpCode(), target.getClassName(), name, getMethodDescription());
+ visitor.visitMethodInsn(opCode.getOpCode(), target.getClassName(), name, getMethodDescription(), target.isInterface());
}
@Override
