Skip to content

Commit

Permalink
JsonTypeDescriptor should use Objects.equals for both Collections and…
Browse files Browse the repository at this point in the history
… Maps #494
  • Loading branch information
vladmihalcea committed Oct 17, 2022
1 parent fb86f62 commit 71b9696
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Expand Up @@ -83,7 +83,8 @@ public boolean areEqual(Object one, Object another) {
if (one instanceof String && another instanceof String) {
return one.equals(another);
}
if (one instanceof Collection && another instanceof Collection) {
if ((one instanceof Collection && another instanceof Collection) ||
(one instanceof Map && another instanceof Map)) {
return Objects.equals(one, another);
}
if (one.getClass().equals(another.getClass()) &&
Expand Down
Expand Up @@ -83,7 +83,8 @@ public boolean areEqual(Object one, Object another) {
if (one instanceof String && another instanceof String) {
return one.equals(another);
}
if (one instanceof Collection && another instanceof Collection) {
if ((one instanceof Collection && another instanceof Collection) ||
(one instanceof Map && another instanceof Map)) {
return Objects.equals(one, another);
}
if (one.getClass().equals(another.getClass()) &&
Expand Down
Expand Up @@ -82,7 +82,8 @@ public boolean areEqual(Object one, Object another) {
if (one instanceof String && another instanceof String) {
return one.equals(another);
}
if (one instanceof Collection && another instanceof Collection) {
if ((one instanceof Collection && another instanceof Collection) ||
(one instanceof Map && another instanceof Map)) {
return Objects.equals(one, another);
}
if (one.getClass().equals(another.getClass()) &&
Expand Down
Expand Up @@ -82,7 +82,8 @@ public boolean areEqual(Object one, Object another) {
if (one instanceof String && another instanceof String) {
return one.equals(another);
}
if (one instanceof Collection && another instanceof Collection) {
if ((one instanceof Collection && another instanceof Collection) ||
(one instanceof Map && another instanceof Map)) {
return Objects.equals(one, another);
}
if (one.getClass().equals(another.getClass()) &&
Expand Down
Expand Up @@ -89,7 +89,8 @@ public boolean areEqual(Object one, Object another) {
if (one instanceof String && another instanceof String) {
return one.equals(another);
}
if (one instanceof Collection && another instanceof Collection) {
if ((one instanceof Collection && another instanceof Collection) ||
(one instanceof Map && another instanceof Map)) {
return Objects.equals(one, another);
}
if (one.getClass().equals(another.getClass()) &&
Expand Down

0 comments on commit 71b9696

Please sign in to comment.