changeset 3904:2d2ca7bf70a7

Prevent ArrayIndexOutOfBounds-Exception. flys-artifacts/trunk@5569 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Sat, 22 Sep 2012 09:57:27 +0000
parents 0623cdf32b38
children 8bbb9e173297
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Sat Sep 22 09:55:01 2012 +0000
+++ b/flys-artifacts/ChangeLog	Sat Sep 22 09:57:27 2012 +0000
@@ -1,3 +1,8 @@
+2012-09-22	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java:
+	  Prevent ArrayIndexOutOfBounds.
+
 2012-09-22	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Document issue880 (extrapolation of wkms).
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Sat Sep 22 09:55:01 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Sat Sep 22 09:57:27 2012 +0000
@@ -338,7 +338,7 @@
                 series.setLabel(series.getLabel() + ", " + labelAdd);
             }
         }
-        if (ThemeUtil.parseShowLevel(theme) && lines.points.length >0
+        if (ThemeUtil.parseShowLevel(theme) && lines.points.length > 1
                 && lines.points[1].length > 0) {
             NumberFormat nf = Formatter.getMeterFormat(this.context);
             String labelAdd = "W=" + nf.format(lines.points[1][0]) + "NN+m";

http://dive4elements.wald.intevation.org