ItEr32S12CUAsignacionGrupoRecursosAPlanificacionItEr31S15: If it's the same the allocation the merge process is not needed

This commit is contained in:
Óscar González Fernández 2009-10-29 19:03:12 +01:00
parent 89d4dced07
commit beabdb382c
2 changed files with 6 additions and 0 deletions

View file

@ -226,6 +226,9 @@ public class GenericResourceAllocation extends
@Override
public void mergeAssignmentsAndResourcesPerDay(ResourceAllocation<?> modifications) {
if (modifications == this) {
return;
}
Validate.isTrue(modifications instanceof GenericResourceAllocation);
mergeAssignments((GenericResourceAllocation) modifications);
setResourcesPerDay(modifications.getResourcesPerDay());

View file

@ -163,6 +163,9 @@ public class SpecificResourceAllocation extends
@Override
public void mergeAssignmentsAndResourcesPerDay(ResourceAllocation<?> modifications) {
if (modifications == this) {
return;
}
Validate.isTrue(modifications instanceof SpecificResourceAllocation);
mergeAssignments((SpecificResourceAllocation) modifications);
setResourcesPerDay(modifications.getResourcesPerDay());