Fails with 'Two methods are annotated' when the `@ToString` method is a specific implementation of a generic interface
hackmann opened this issue · comments
Generic interface
public interface HasCode<C> {
C getCode();
}
And a String implementation
public final class AirportCode implements HasCode<String> {
private final String code;
@Override
@ToString
public String getCode() {
return code;
}
It fails with 'Two methods are annotated with @tostring: net.worldticket.commons.flight.AirportCode.'
It finds the getCode()
method twice one with a String return type and the other with an Object as return type.
Looks like the compiler changed although I can't reproduce it.