Skip to content

Commit

Permalink
Merge pull request eugenp#12197 from eugenp/BAEL-5420-v2
Browse files Browse the repository at this point in the history
BAEL-5420 fix equals method
  • Loading branch information
lor6 authored May 11, 2022
2 parents fa64770 + 3d706a4 commit 2f165c9
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ public LocalDate getStartDate() {

@Override
public boolean equals(Object obj) {
return Objects.equals(firstName, this.firstName)
&& Objects.equals(lastName, this.lastName)
&& Objects.equals(startDate, this.startDate);

if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;

EmployeeVO emp = (EmployeeVO) obj;

return Objects.equals(firstName, emp.firstName)
&& Objects.equals(lastName, emp.lastName)
&& Objects.equals(startDate, emp.startDate);
}

@Override
Expand Down

0 comments on commit 2f165c9

Please sign in to comment.