When I work with AggregateReference I get Intellij warning “Argument ‘entity.getMachine().getId()’ might be null ”.
Looking through the AggregateReference code I do find the Nullable annotation on the getId method, but at the same time in the code of the only implementation there is an explicit assert that the passed id cannot be null.
public IdOnlyAggregateReference(ID id) {
Assert.notNull(id, "Id must not be null");
this.id = id;
}
I think the Nullable annotation should be removed from the getId method.