[Bug #671] Fixed bug, adding a null check before calling inner methods.

FEA: ItEr61S05BugFixing
This commit is contained in:
Jacobo Aragunde Pérez 2010-10-07 20:53:50 +02:00
parent 79425a183f
commit 8a2f913b89

View file

@ -449,9 +449,12 @@ public class EditTaskController extends GenericForwardComposer {
if ((taskElement == null) || (!isTaskLeafConstraint())) {
return null;
}
return ((ITaskLeafConstraint) taskElement).getStartConstraint()
.getConstraintDate().toDateTimeAtStartOfDay().toDate();
LocalDate constraintDate = ((ITaskLeafConstraint) taskElement)
.getStartConstraint().getConstraintDate();
if(constraintDate == null) {
return null;
}
return constraintDate.toDateTimeAtStartOfDay().toDate();
}
private boolean isTaskLeafConstraint() {