protected int calcHashCode() {
int result = attribute.hashCode(); <----- Ok, attribute knows it is nullable
result = 31 * result + value.hashCode(); <----- NPE - value being compared is null
return result;
}
/** The equal query for a nullable attribute. */
public static <A, O> Query<A> equal(Attribute<A, O> attribute, O value) {
return value == null ? not(has(attribute)) : QueryFactory.equal(attribute, value);
}