[Bug #816] Fix bug
The problem lied in that the @NotNull annotation was applied to a field. This is dangerous because if the object that is being validated is a proxy, the value is always null. Now the annotation was moved to the getter. FEA: ItEr69S04BugFixing
This commit is contained in:
parent
be4bc0092f
commit
9f7e428e4a
1 changed files with 1 additions and 1 deletions
|
|
@ -443,7 +443,6 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
|
|||
private AssignmentFunction assignmentFunction;
|
||||
|
||||
@OnCopy(Strategy.SHARE)
|
||||
@NotNull
|
||||
private ResourcesPerDay resourcesPerDay;
|
||||
|
||||
private Integer intendedTotalHours;
|
||||
|
|
@ -1418,6 +1417,7 @@ 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