changeset 2991:fcb2166b8e0d

FixA: Fixed class cast bug in report facet. flys-artifacts/trunk@4540 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 27 May 2012 18:11:31 +0000
parents 749a40c76ca3
children 0abdede5a0b8
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReportFacet.java
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Sun May 27 18:02:13 2012 +0000
+++ b/flys-artifacts/ChangeLog	Sun May 27 18:11:31 2012 +0000
@@ -1,3 +1,10 @@
+2012-05-27	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/model/ReportFacet.java:
+	  There was a cast to WINFOArtifact where a cast to FLYSArtifact
+	  is sufficient. This prevented generating error reports that
+	  does not inherit from WINFOArtifact like FixationArtifact.
+
 2012-05-27	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* doc/conf/artifacts/fixanalysis.xml,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReportFacet.java	Sun May 27 18:02:13 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReportFacet.java	Sun May 27 18:11:31 2012 +0000
@@ -8,7 +8,7 @@
 
 import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
 
-import de.intevation.flys.artifacts.WINFOArtifact;
+import de.intevation.flys.artifacts.FLYSArtifact;
 
 
 import org.apache.log4j.Logger;
@@ -43,9 +43,9 @@
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("get report data");
 
-        WINFOArtifact winfo = (WINFOArtifact)artifact;
+        FLYSArtifact flys = (FLYSArtifact)artifact;
 
-        CalculationResult cr = (CalculationResult)winfo.compute(
+        CalculationResult cr = (CalculationResult)flys.compute(
             context, hash, stateId, type, false);
 
         return cr.getReport();

http://dive4elements.wald.intevation.org