Optimization suggested by Ray.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@2267 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2007-12-17 22:25:57 +00:00
parent 43ec6f629c
commit 6954e1a61b
+1 -1
View File
@@ -56,7 +56,7 @@ public class ObjectUtil
*/
public static <T extends Comparable<? super T>> int compareTo (T left, T right)
{
if (left == null && right == null) {
if (left == right) { // instances are both null or both the same instance
return 0;
} else if (left == null) {
return -1;