Skip to content

Commit

Permalink
LANG-1349: EqualsBuilder#isRegistered: swappedPair construction bug (c…
Browse files Browse the repository at this point in the history
…loses #282)

SwappedPair constructed as Pair.of(rhs,lhs)
  • Loading branch information
namannigam authored and PascalSchumacher committed Sep 8, 2017
1 parent d6ad3f0 commit 3e08af5
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -157,7 +157,7 @@ static Pair<IDKey, IDKey> getRegisterPair(final Object lhs, final Object rhs) {
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));
Expand Down

0 comments on commit 3e08af5

Please sign in to comment.