[PATCH] Fixed data datatype to avoid cast exceptions

Wald Commits scm-commit at wald.intevation.org
Wed Jun 20 13:08:32 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1529492894 -7200
# Node ID 3ead6937ae7c39eb8b70a6e6672eb8ffb8e57444
# Parent  0cc241ddc2a02eb9f0426cb47fe3dcd7141921c2
Fixed data datatype to avoid cast exceptions

diff -r 0cc241ddc2a0 -r 3ead6937ae7c artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultFacet.java
--- 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);
     }


More information about the Dive4Elements-commits mailing list