Bug #1496: Fix issue when visiting project dashboard in a project with milestones
FEA: ItEr76S04BugFixing
This commit is contained in:
parent
540d3c1378
commit
894f818ad8
4 changed files with 12 additions and 2 deletions
|
|
@ -1241,6 +1241,7 @@ public class Task extends TaskElement implements ITaskPositionConstrained {
|
|||
return sumChargedEffort != null && !sumChargedEffort.isZero();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acceptVisitor(TaskElementVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -369,6 +369,7 @@ public class TaskGroup extends TaskElement {
|
|||
return this.isInProgress.booleanValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acceptVisitor(TaskElementVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ import java.util.Collections;
|
|||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
|
|
@ -206,7 +205,7 @@ public class TaskMilestone extends TaskElement implements ITaskPositionConstrain
|
|||
|
||||
@Override
|
||||
public void acceptVisitor(TaskElementVisitor visitor) {
|
||||
throw new RuntimeException("No visitors should visit this type of TaskElement");
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ package org.libreplan.business.util;
|
|||
*/
|
||||
import org.libreplan.business.planner.entities.Task;
|
||||
import org.libreplan.business.planner.entities.TaskGroup;
|
||||
import org.libreplan.business.planner.entities.TaskMilestone;
|
||||
|
||||
public abstract class TaskElementVisitor {
|
||||
|
||||
|
|
@ -34,4 +35,12 @@ public abstract class TaskElementVisitor {
|
|||
|
||||
public abstract void visit(TaskGroup taskGroup);
|
||||
|
||||
/**
|
||||
* As most of the visitors doesn't need to process the {@link TaskMilestone
|
||||
* TaskMilestones} is provided a default implementation doing nothing.
|
||||
*/
|
||||
public void visit(TaskMilestone taskMilestone) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue