changeset 1681:e5f7f25a511c

fixed flys/issue201 flys-artifacts/trunk@2899 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 05 Oct 2011 16:58:38 +0000
parents f4da2009eb8b
children 394b7ac58fc9
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Oct 05 15:04:00 2011 +0000
+++ b/flys-artifacts/ChangeLog	Wed Oct 05 16:58:38 2011 +0000
@@ -1,3 +1,10 @@
+2011-10-05	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	fixed flys/issue201
+
+	* src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java:
+	  Replace >= with > in km index lookup because last km was not found.
+
 2011-10-05	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	fixed flys/issue177
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java	Wed Oct 05 15:04:00 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java	Wed Oct 05 16:58:38 2011 +0000
@@ -486,7 +486,7 @@
 
         rowIndex = -rowIndex -1;
 
-        if (rowIndex < 1 || rowIndex >= R1) {
+        if (rowIndex < 1 || rowIndex > R1) {
             // do not extrapolate
             return false;
         }
@@ -571,7 +571,7 @@
 
             rowIndex = -rowIndex -1;
 
-            if (rowIndex < 1 || rowIndex >= R1) {
+            if (rowIndex < 1 || rowIndex > R1) {
                 // do not extrapolate
                 if (errors != null) {
                     errors.addProblem(kms[i], "cannot find km");

http://dive4elements.wald.intevation.org