[Bug #769] Fix bug

Ensuring that the variable with the resulting restrictions is not
null. When the task is fixed, this variable was not intialized.

FEA: ItEr66S04BugFixing
This commit is contained in:
Óscar González Fernández 2010-12-21 15:30:56 +01:00
parent 18bec6f9f3
commit edf8bab805

View file

@ -1163,19 +1163,19 @@ public class GanttDiagramGraph<V, D extends IDependency<V>> implements
this.task = taskPoint.task;
}
protected PositionRestrictions result;
private PositionRestrictions resultingRestrictions = new NoRestrictions();
protected PositionRestrictions applyConstraintTo(
PositionRestrictions restrictions) {
if (adapter.isFixed(task)) {
return restrictions;
}
result = enforceUsingPreviousRestrictions(restrictions);
return result;
resultingRestrictions = enforceUsingPreviousRestrictions(restrictions);
return resultingRestrictions;
}
public boolean isSatisfiedBy(PositionRestrictions value) {
return result.satisfies(value);
return resultingRestrictions.satisfies(value);
}
public void checkSatisfiesResult(PositionRestrictions finalResult) {