Mercurial > dive4elements > river
changeset 4303:d65cf8e40230
WaterlevelFacet: Deal with ExtremeResult if it is embedded in CalculationResult (instead of WQKms).
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 29 Oct 2012 13:47:34 +0100 |
parents | ce10b846bc86 |
children | 45f793826a43 |
files | flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java Mon Oct 29 13:46:39 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java Mon Oct 29 13:47:34 2012 +0100 @@ -6,6 +6,7 @@ import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.math.Linear; import de.intevation.flys.artifacts.states.DefaultState.ComputeType; +import de.intevation.flys.artifacts.model.extreme.ExtremeResult; import org.apache.log4j.Logger; @@ -35,7 +36,9 @@ } protected WQKms [] getWQKms(CalculationResult res) { - return (WQKms [])res.getData(); + if (res.getData() instanceof ExtremeResult) + return ((ExtremeResult) res.getData()).getWQKms(); + return (WQKms []) res.getData(); } /**