ItEr34S12CUCreacionUnidadesPlanificacionItEr33S14: Reusing canBeScheduled method to check precondition at schedule

This commit is contained in:
Óscar González Fernández 2009-11-12 13:16:00 +01:00
parent 1503b6e175
commit 760ab9734d

View file

@ -170,7 +170,7 @@ public class SchedulingState {
}
public void schedule() {
if (type.isSomewhatScheduled()) {
if (!canBeScheduled()) {
throw new IllegalStateException("it's already somewhat scheduled");
}
setType(Type.SCHEDULING_POINT);