comparator method don't accept all possible comparable objects
bjrke opened this issue · comments
https://avro.apache.org/ for example creates classes which implement Comparable<SpecificRecord>
but not Comparable<ClassName>
.
Instead every avro class extends SpecificRecordBase
which also contains the implementation of compareTo
.
Because of this its not easy to use matchers like lessThan
.
A solution is to replace Comparable<T>
with Comparable<? super T>
like I did in my PR #327