LANG-1349: EqualsBuilder#isRegistered: swappedPair construction bug (closes #282)

SwappedPair constructed as Pair.of(rhs,lhs)
This commit is contained in:
namannigam 2017-08-10 08:45:27 +05:30 committed by pascalschumacher
parent d6ad3f0157
commit 3e08af573f
1 changed files with 1 additions and 1 deletions

View File

@ -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));