changeset 2789:834b81134b12

Fixed broken crosssection chart creation if no hyks are existing. flys-artifacts/trunk@4529 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Sun, 27 May 2012 10:47:47 +0000
parents 063b784b60b4
children 19c119601111 5a8ec40752ea
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Sat May 26 21:33:54 2012 +0000
+++ b/flys-artifacts/ChangeLog	Sun May 27 10:47:47 2012 +0000
@@ -1,3 +1,8 @@
+2012-05-27  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java:
+	  Don't break chart creation if no hyks are existing.
+
 2012-05-26	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/fixings/DeltaWTsKM.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Sat May 26 21:33:54 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Sun May 27 10:47:47 2012 +0000
@@ -253,8 +253,9 @@
 
         List<HYKFactory.Zone> zones = (List<HYKFactory.Zone>) o;
 
-        if (zones.size() == 0) {
-            logger.debug("CrossSectionGenerator.doHYK: empty zone list received.");
+        if (zones == null || zones.size() == 0) {
+            logger.warn("CrossSectionGenerator.doHYK: empty zone list received.");
+            return;
         }
 
         // Actual Styling is done in XYChartGenerator.

http://dive4elements.wald.intevation.org