From 6bc707eb676dc3d99beee587dda867e2b1a9bf3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Gonz=C3=A1lez=20Fern=C3=A1ndez?= Date: Mon, 25 Jan 2010 11:17:49 +0100 Subject: [PATCH] ItEr45S10CUAsignacionRecursosEspecificosAPlanificacionItEr44S16: Checking type too. --- .../allocation/streches/StrechesFunctionConfiguration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/StrechesFunctionConfiguration.java b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/StrechesFunctionConfiguration.java index 7b18c797d..964dc0db0 100644 --- a/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/StrechesFunctionConfiguration.java +++ b/navalplanner-webapp/src/main/java/org/navalplanner/web/planner/allocation/streches/StrechesFunctionConfiguration.java @@ -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