Simplify hashcode example
This commit is contained in:
parent
f4c049f829
commit
eadd24ad5d
|
@ -32,10 +32,7 @@ public class EqualByBusinessKey {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((email == null) ? 0 : email.hashCode());
|
||||
return result;
|
||||
return java.util.Objects.hashCode(email);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue