[Bug #663] Fix bug
It was always retrieving end data for AggregateOfResourceAllocations and that's illegal when the aggregate is empty. FEA: ItEr61S05BugFixing
This commit is contained in:
parent
e8b77aba32
commit
152e5216ff
2 changed files with 8 additions and 1 deletions
|
|
@ -103,6 +103,13 @@ public class AggregateOfResourceAllocations {
|
|||
return end != null ? end.getDate() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the latest end of all the allocations of this aggregate
|
||||
*
|
||||
* @return
|
||||
* @throws IllegalStateException
|
||||
* if the aggregate is empty
|
||||
*/
|
||||
public IntraDayDate getEnd() {
|
||||
if (isEmpty()) {
|
||||
throw new IllegalStateException("the aggregate is empty");
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class AllocationResult {
|
|||
this.aggregate = aggregate;
|
||||
this.daysDuration = aggregate.isEmpty() ? task.getDaysDuration()
|
||||
: aggregate.getDaysDuration();
|
||||
this.end = aggregate.getEnd();
|
||||
this.end = aggregate.isEmpty() ? null : aggregate.getEnd();
|
||||
this.newAllocations = newAllocations;
|
||||
this.modified = modified;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue