[Bug #895] Fix bug

The problem was that the resource allocation was a proxy and
mistakenly the validation annotation was applied to the field.

FEA: ItEr71S04BugFixing
This commit is contained in:
Óscar González Fernández 2011-02-28 13:59:40 +01:00
parent 4a0eb44b41
commit 95b3be8486

View file

@ -454,7 +454,6 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
private AssignmentFunction assignmentFunction;
@OnCopy(Strategy.SHARE)
@NotNull
private ResourcesPerDay resourcesPerDay;
private Integer intendedTotalHours;
@ -1545,6 +1544,13 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
return calculateResourcesPerDayFromAssignments(getConsolidatedAssignments());
}
// just called for validation purposes. It must be public, otherwise if it's
// a proxy the call is not intercepted.
@NotNull
public ResourcesPerDay getRawResourcesPerDay() {
return resourcesPerDay;
}
public ResourcesPerDay getResourcesPerDay() {
if (resourcesPerDay == null) {
return ResourcesPerDay.amount(0);