Apply validation annotation to the field
Because it's a value object this is not dangerous, i.e., it can't be a proxy. Now it's really checked a not null value is not saved.
This commit is contained in:
parent
03febe580f
commit
a196487fd0
1 changed files with 1 additions and 1 deletions
|
|
@ -461,6 +461,7 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
|
|||
private AssignmentFunction assignmentFunction;
|
||||
|
||||
@OnCopy(Strategy.SHARE)
|
||||
@NotNull
|
||||
private ResourcesPerDay resourcesPerDay;
|
||||
|
||||
private Integer intendedTotalHours;
|
||||
|
|
@ -1552,7 +1553,6 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
|
|||
return calculateResourcesPerDayFromAssignments(getConsolidatedAssignments());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public ResourcesPerDay getResourcesPerDay() {
|
||||
if (resourcesPerDay == null) {
|
||||
return ResourcesPerDay.amount(0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue