Mercurial > dive4elements > river
changeset 715:9665d6a48f7b
Fix for flys/issue154
flys-artifacts/trunk@2182 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 21 Jun 2011 16:31:19 +0000 |
parents | 2f25ca828efd |
children | 733d6db30722 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveExporter.java |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Jun 21 16:22:28 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Jun 21 16:31:19 2011 +0000 @@ -1,3 +1,10 @@ +2011-06-21 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + Fix for flys/issue154 + + * src/main/java/de/intevation/flys/exports/ComputedDischargeCurveExporter.java: + Checks for right class now. + 2011-06-21 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveExporter.java Tue Jun 21 16:22:28 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveExporter.java Tue Jun 21 16:31:19 2011 +0000 @@ -14,7 +14,9 @@ import de.intevation.artifacts.CallContext; +import de.intevation.flys.artifacts.model.CalculationResult; import de.intevation.flys.artifacts.model.WQKms; + import de.intevation.flys.utils.Formatter; @@ -52,8 +54,11 @@ @Override protected void addData(Object d) { - if (d instanceof WQKms []) { - data.addAll(Arrays.asList((WQKms [])d)); + if (d instanceof CalculationResult) { + d = ((CalculationResult)d).getData(); + if (d instanceof WQKms []) { + data.addAll(Arrays.asList((WQKms [])d)); + } } }