I posted this on #949 but to give it a name, i'll repost it again below:
I think i've accidentally revived this issue. I have
interface IndividualMotorComponent {
int id();
}
interface OtherMotorComponent {
int someotherId();
}
interface MotorComponent extends OtherMotorComponent, IndividualMotorComponent {
}
I go to parse the methods on MotorComponent like so
for (Method method : useClass.getMethods()) {
//add to a list
}
for (Method method : list) {
builder = builder
.method(ElementMatchers.named(values.getKey().getName()))
.intercept(supplierInvoke);
}
where supplierInvoke is a MethodCall. This works for all interfaces that do not extend other interfaces (If i did this with IndividualMotorComponent it seemed to work okay), but when I use the MotorComponent interface i get the following:
Error at xyz.auriium.mattlib2.rev.HardwareREV.createSparkmax(HardwareREV.java:16): Unhandled exception: java.lang.AbstractMethodError: Receiver class xyz.auriium.mattlib2.hardware.config.MotorComponent$Delegated_e4d225ef does not define or inherit an implementation of the resolved method 'int id()' of interface xyz.auriium.mattlib2.hardware.config.MotorComponent.
Testing reveals that the method.intercept code is being called for the method id(), but when printed the Method displays as so:
public abstract int xyz.auriium.mattlib2.hardware.config.IndividualMotorComponent.id() implemented with 0
I do not know why this occurs but maybe bytebuddy is looking for a Method id specifically defined on MotorComponent, but isn't recognizing that IndividualMotorComponent defines id and so therefore MotorComponent should inherit that implementation?
I posted this on #949 but to give it a name, i'll repost it again below:
I think i've accidentally revived this issue. I have
I go to parse the methods on MotorComponent like so
where supplierInvoke is a MethodCall. This works for all interfaces that do not extend other interfaces (If i did this with IndividualMotorComponent it seemed to work okay), but when I use the MotorComponent interface i get the following:
Testing reveals that the method.intercept code is being called for the method id(), but when printed the Method displays as so:
I do not know why this occurs but maybe bytebuddy is looking for a Method id specifically defined on MotorComponent, but isn't recognizing that IndividualMotorComponent defines id and so therefore MotorComponent should inherit that implementation?