BAEL-5420 fix equals method
This commit is contained in:
parent
f24b9af096
commit
f5380f98f6
@ -28,9 +28,15 @@ public class EmployeeVO {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
return Objects.equals(firstName, this.firstName)
|
|
||||||
&& Objects.equals(lastName, this.lastName)
|
if (this == obj) return true;
|
||||||
&& Objects.equals(startDate, this.startDate);
|
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
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user