commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r980923 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
Date Fri, 30 Jul 2010 18:59:09 GMT
Author: mbenson
Date: Fri Jul 30 18:59:09 2010
New Revision: 980923

URL: http://svn.apache.org/viewvc?rev=980923&view=rev
Log:
use static method for brevity, avoiding type params

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java?rev=980923&r1=980922&r2=980923&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
Fri Jul 30 18:59:09 2010
@@ -140,7 +140,7 @@ public class EqualsBuilder implements Bu
     static Pair<IDKey, IDKey> getRegisterPair(Object lhs, Object rhs) {
         IDKey left = new IDKey(lhs);
         IDKey right = new IDKey(rhs);
-        return new Pair<IDKey, IDKey>(left, right);
+        return Pair.of(left, right);
     }
 
     /**
@@ -159,8 +159,7 @@ public class EqualsBuilder implements Bu
     static boolean isRegistered(Object lhs, Object rhs) {
         Set<Pair<IDKey, IDKey>> registry = getRegistry();
         Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs);
-        Pair<IDKey, IDKey> swappedPair = new Pair<IDKey, IDKey>(pair.right,
-                pair.left);
+        Pair<IDKey, IDKey> swappedPair = Pair.of(pair.right, pair.left);
 
         return registry != null
                 && (registry.contains(pair) || registry.contains(swappedPair));



Mime
View raw message