From 3244c46fe92a6db997d89e60ffa39678219f487d Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Fri, 30 Jul 2010 18:59:09 +0000 Subject: [PATCH] use static method for brevity, avoiding type params git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@980923 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/commons/lang3/builder/EqualsBuilder.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java index 7db4a0708..e52329cf1 100644 --- a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java @@ -140,7 +140,7 @@ public class EqualsBuilder implements Builder { static Pair getRegisterPair(Object lhs, Object rhs) { IDKey left = new IDKey(lhs); IDKey right = new IDKey(rhs); - return new Pair(left, right); + return Pair.of(left, right); } /** @@ -159,8 +159,7 @@ public class EqualsBuilder implements Builder { static boolean isRegistered(Object lhs, Object rhs) { Set> registry = getRegistry(); Pair pair = getRegisterPair(lhs, rhs); - Pair swappedPair = new Pair(pair.right, - pair.left); + Pair swappedPair = Pair.of(pair.right, pair.left); return registry != null && (registry.contains(pair) || registry.contains(swappedPair));