JavaHamcrest
JavaHamcrest copied to clipboard
comparator method don't accept all possible comparable objects
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 https://github.com/hamcrest/JavaHamcrest/pull/327