Added name information to CachedMethod comparator
This commit is contained in:
parent
16db5a89d0
commit
7237d03407
@ -68,8 +68,11 @@ class CachedMethod {
|
|||||||
public
|
public
|
||||||
int compare(Method o1, Method o2) {
|
int compare(Method o1, Method o2) {
|
||||||
// Methods are sorted so they can be represented as an index.
|
// Methods are sorted so they can be represented as an index.
|
||||||
int diff = o1.getName()
|
String o1Name = o1.getName();
|
||||||
.compareTo(o2.getName());
|
String o2Name = o2.getName();
|
||||||
|
|
||||||
|
|
||||||
|
int diff = o1Name.compareTo(o2Name);
|
||||||
if (diff != 0) {
|
if (diff != 0) {
|
||||||
return diff;
|
return diff;
|
||||||
}
|
}
|
||||||
@ -91,7 +94,9 @@ class CachedMethod {
|
|||||||
return diff;
|
return diff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new RuntimeException("Two methods with same signature!"); // Impossible, should never happen
|
|
||||||
|
// Impossible, should never happen
|
||||||
|
throw new RuntimeException("Two methods with same signature! ('" + o1Name + "', '" + o2Name + "'");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user