ItEr59S04ValidacionEProbasFuncionaisItEr58S04: Fix bug NullPointerException, limiting allocations can be children from groups
This commit is contained in:
parent
cdb9704046
commit
a242404b5b
1 changed files with 12 additions and 4 deletions
|
|
@ -172,10 +172,7 @@ public class SaveCommand implements ISaveCommand {
|
|||
for (TaskElement taskElement : state.getTasksToSave()) {
|
||||
removeDetachedDerivedDayAssignments(taskElement);
|
||||
removeEmptyConsolidation(taskElement);
|
||||
if (taskElement.isLimiting()) {
|
||||
Task task = (Task) taskElement;
|
||||
updateLimitingResourceQueueElementDates(task);
|
||||
}
|
||||
updateLimitingResourceQueueElementDates(taskElement);
|
||||
taskElementDAO.save(taskElement);
|
||||
}
|
||||
|
||||
|
|
@ -190,6 +187,17 @@ public class SaveCommand implements ISaveCommand {
|
|||
}
|
||||
}
|
||||
|
||||
private void updateLimitingResourceQueueElementDates(TaskElement taskElement) {
|
||||
if (taskElement.isLimiting()) {
|
||||
Task task = (Task) taskElement;
|
||||
updateLimitingResourceQueueElementDates(task);
|
||||
} else if (!taskElement.isLeaf()) {
|
||||
for (TaskElement each : taskElement.getChildren()) {
|
||||
updateLimitingResourceQueueElementDates(each);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateLimitingResourceQueueElementDates(Task task) {
|
||||
LimitingResourceQueueElement limiting = task
|
||||
.getAssociatedLimitingResourceQueueElementIfAny();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue