Skip to content

Commit

Permalink
#3124: Fix equals method
Browse files Browse the repository at this point in the history
  • Loading branch information
gjvoosten committed Aug 5, 2020
1 parent 888a499 commit 4407bc6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/java/mil/dds/anet/beans/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,11 @@ public boolean equals(Object o) {
&& Objects.equals(other.getRank(), rank) && Objects.equals(other.getBiography(), biography)
&& Objects.equals(other.getPendingVerification(), pendingVerification)
&& Objects.equals(other.getAvatar(), getAvatar()) && Objects.equals(other.getCode(), code)
&& (createdAt != null)
? (createdAt.equals(other.getCreatedAt()))
: (other.getCreatedAt() == null) && (updatedAt != null)
? (updatedAt.equals(other.getUpdatedAt()))
: (other.getUpdatedAt() == null)
&& Objects.equals(other.getCustomFields(), customFields);
&& (createdAt != null ? createdAt.equals(other.getCreatedAt())
: (other.getCreatedAt() == null && updatedAt != null)
? updatedAt.equals(other.getUpdatedAt())
: other.getUpdatedAt() == null)
&& Objects.equals(other.getCustomFields(), customFields);
return b;
}

Expand Down

0 comments on commit 4407bc6

Please sign in to comment.