Modified implementation of equals() so that it's quicker when the two

references point to the same object.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1510 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert@gmail.com
2004-09-30 23:49:36 +00:00
parent d2875aea5a
commit 962ebeec53
@@ -33,7 +33,7 @@ public class ObjectUtil
*/
public static boolean equals (Object o1, Object o2)
{
return (o1 == null) ? (o2 == null) : o1.equals(o2);
return (o1 == o2) || ((o1 != null) && o1.equals(o2));
}
/**