changeset 9166:3ead6937ae7c

Fixed data datatype to avoid cast exceptions
author mschaefer
date Wed, 20 Jun 2018 13:08:14 +0200
parents 0cc241ddc2a0
children cb3a91dc4e3b
files artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultFacet.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultFacet.java	Wed Jun 20 11:18:47 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultFacet.java	Wed Jun 20 13:08:14 2018 +0200
@@ -13,6 +13,8 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.river.artifacts.D4EArtifact;
+import org.dive4elements.river.artifacts.common.AbstractCalculationListResults;
+import org.dive4elements.river.artifacts.common.AbstractCalculationResult;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
@@ -45,7 +47,7 @@
 
         final CalculationResult res = (CalculationResult) flys.compute(context, this.hash, this.stateId, this.type, false);
 
-        final AbstractSInfoCalculationResults data = (AbstractSInfoCalculationResults) res.getData();
+        final AbstractCalculationListResults<AbstractCalculationResult> data = (AbstractCalculationListResults<AbstractCalculationResult>) res.getData();
 
         return data.getResults().get(this.index);
     }

http://dive4elements.wald.intevation.org