LANG-1349: EqualsBuilder#isRegistered: swappedPair construction bug (closes #282)
SwappedPair constructed as Pair.of(rhs,lhs)
This commit is contained in:
parent
d6ad3f0157
commit
3e08af573f
|
@ -157,7 +157,7 @@ public class EqualsBuilder implements Builder<Boolean> {
|
|||
static boolean isRegistered(final Object lhs, final Object rhs) {
|
||||
final Set<Pair<IDKey, IDKey>> registry = getRegistry();
|
||||
final Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs);
|
||||
final Pair<IDKey, IDKey> swappedPair = Pair.of(pair.getLeft(), pair.getRight());
|
||||
final Pair<IDKey, IDKey> swappedPair = Pair.of(pair.getRight(), pair.getLeft());
|
||||
|
||||
return registry != null
|
||||
&& (registry.contains(pair) || registry.contains(swappedPair));
|
||||
|
|
Loading…
Reference in New Issue