ItEr46S12CUVisualizacionResponsabilidadesTRaballoNaPlanificacion: Checking dates are not null.

This commit is contained in:
Óscar González Fernández 2010-02-03 17:34:37 +01:00
parent 16b2104ca6
commit e85181f60f

View file

@ -113,6 +113,12 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
@Override
public int compare(ResourceAllocation<?> o1,
ResourceAllocation<?> o2) {
if (o1.getStartDate() == null) {
return -1;
}
if (o2.getStartDate() == null) {
return 1;
}
return o1.getStartDate().compareTo(o2.getStartDate());
}
};