Bug #1282, #1376: Prevent exception when deleting a milestone inside a container.

The order in the deletion of the different objects related with the task was
wrong and it was causing an exception.

Moreover, the exception was breaking the flow of execution in our application
and preventing that the size of container was updated.

FEA: ItEr76S04BugFixing
This commit is contained in:
Jacobo Aragunde Pérez 2012-02-16 17:01:54 +01:00
parent f0ee0f1983
commit 0be7843279

View file

@ -306,11 +306,11 @@ public class FunctionalityExposedForExtensions<T> implements IContext<T> {
public Position remove(T domainObject) {
Task task = mapper.findAssociatedBean(domainObject);
Position position = mapper.findPositionFor(task);
adapter.doRemovalOf(mapper.findAssociatedDomainObject(task));
mapper.remove(domainObject);
diagramGraph.remove(task);
task.removed();
planner.removeTask(task);
adapter.doRemovalOf(mapper.findAssociatedDomainObject(task));
mapper.remove(domainObject);
return position;
}