Simplify hashcode example

This commit is contained in:
andrebrowne 2020-07-28 18:03:57 -04:00 committed by GitHub
parent f4c049f829
commit eadd24ad5d
1 changed files with 1 additions and 4 deletions

View File

@ -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