I am considering using Eclipse generated HashCode and I have a basic doubt (using it for the first time). Why does the hashCode in the below code snippet use the result field? I feel it is redundant and would like to understand what possible reasons could cause it to being there
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((projectId == null) ? 0 : projectId.hashCode());
return result;
}