ItEr46S12CUVisualizacionResponsabilidadesTRaballoNaPlanificacion: Checking dates are not null.
This commit is contained in:
parent
16b2104ca6
commit
e85181f60f
1 changed files with 6 additions and 0 deletions
|
|
@ -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());
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue