changeset 1102:aaacced2a0cc

Fixed an ArrayIndexOutOfBounds exception that occured while initializing the ParameterMatrix (issue281). gnv-artifacts/trunk@1228 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 28 Jun 2010 10:25:55 +0000
parents e38f93d64253
children faae3fc7b792
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/MeasurementState.java
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Mon Jun 28 09:33:11 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Mon Jun 28 10:25:55 2010 +0000
@@ -1,3 +1,11 @@
+2010-06-28  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	  Issue281
+
+	* src/main/java/de/intevation/gnv/state/MeasurementState.java: Fixed an
+	  ArrayIndexOutOfBounds exception that occured while initializing the
+	  ParameterMatrix.
+
 2010-06-28  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	  Issue230
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/MeasurementState.java	Mon Jun 28 09:33:11 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/MeasurementState.java	Mon Jun 28 10:25:55 2010 +0000
@@ -108,17 +108,15 @@
                 if (i < 0) {
                     measurements.add(key);
                     i = measurements.indexOf(key);
+
+                    mDescriptions.add(val);
+                    tmp = mDescriptions.indexOf(val);
                 }
 
                 if (j < 0) {
                     logger.warn("Not a valid parameter: " + parameter);
                 }
 
-                if (tmp < 0) {
-                    mDescriptions.add(val);
-                    tmp = mDescriptions.indexOf(val);
-                }
-
                 if (i >= 0 && i < measurements.size() && j >= 0
                 &&  j < parameters.size())
                 {

http://dive4elements.wald.intevation.org