Simplify hashcode example
@@ -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
