ItEr45S10CUAsignacionRecursosEspecificosAPlanificacionItEr44S16: Checking type too.

This commit is contained in:
Óscar González Fernández 2010-01-25 11:17:49 +01:00
parent 1091ede3ca
commit 6bc707eb67

View file

@ -72,7 +72,11 @@ public abstract class StrechesFunctionConfiguration implements
@Override
public boolean isTargetedTo(AssignmentFunction function) {
return function instanceof StretchesFunction;
if (!(function instanceof StretchesFunction)) {
return false;
}
StretchesFunction s = (StretchesFunction) function;
return s.getType() == getType();
}
@Override