Permalink
Browse files

Update comparable generic types

  • Loading branch information...
1 parent 75f2aed commit 374c2edd5271c694a3641f87ecf23d96f1a83425 @mikera committed Oct 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/mikera/util/Tools.java
@@ -165,7 +165,7 @@ public static int hashCode(long l) {
* @param b
* @return
*/
- public static <T extends Comparable<T>> int compareWithNulls(T a, T b) {
+ public static <T extends Comparable<? super T>> int compareWithNulls(T a, T b) {
if (a==b) return 0;
if (a==null) return -1;
if (b==null) return 1;

0 comments on commit 374c2ed

Please sign in to comment.