Skip to content

Commit

Permalink
Add support for Maps to verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
cberner committed Oct 2, 2014
1 parent a914963 commit 3f9030c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -456,7 +457,7 @@ public int compare(Object a, Object b)
if (a.getClass() != b.getClass()) {
throw new TypesDoNotMatchException(format("item types do not match: %s vs %s", a.getClass().getName(), b.getClass().getName()));
}
if (a instanceof Collection && b instanceof Collection) {
if ((a instanceof Collection && b instanceof Collection) || (a instanceof Map && b instanceof Map)) {
if (a.equals(b)) {
return 0;
}
Expand Down

0 comments on commit 3f9030c

Please sign in to comment.