changeset 1687:19c4cf5163e8

Take care on empty ranges (null) while preparing single point ranges. flys-artifacts/trunk@2905 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 07 Oct 2011 13:33:10 +0000
parents e8d1e531687a
children 7eb9015489b0
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Oct 07 13:15:48 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri Oct 07 13:33:10 2011 +0000
@@ -1,3 +1,8 @@
+2011-10-07  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/XYChartGenerator.java:
+	  Take care on empty ranges while preparing ranges for single points.
+
 2011-10-07  Ingo Weinzierl <ingo@intevation.de>
 
 	flys/issue114 (W-INFO: Wasserspiegellagenberechnung / Ort (Spezialfall: Generierung eines Diagramms bei punkthafter Berechnung))
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Fri Oct 07 13:15:48 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java	Fri Oct 07 13:33:10 2011 +0000
@@ -267,7 +267,7 @@
             Integer key = new Integer(i);
 
             Range r = xRanges.get(key);
-            if (r.getLowerBound() == r.getUpperBound()) {
+            if (r != null && r.getLowerBound() == r.getUpperBound()) {
                 xRanges.put(key, expandRange(r, 5));
             }
         }
@@ -276,7 +276,7 @@
             Integer key = new Integer(i);
 
             Range r = yRanges.get(key);
-            if (r.getLowerBound() == r.getUpperBound()) {
+            if (r != null && r.getLowerBound() == r.getUpperBound()) {
                 yRanges.put(key, expandRange(r, 5));
             }
         }

http://dive4elements.wald.intevation.org