[Dive4elements-commits] [PATCH 1 of 2] I1035: Fixed calculation of multiple bed height differences

Wald Commits scm-commit at wald.intevation.org
Thu Jun 6 10:56:32 CEST 2013


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1370508914 -7200
# Node ID 165086b1e66d75ae8567af632a998826ff993c51
# Parent  1642e08d14d251a83940907f597d69bcf5e7d647
I1035: Fixed calculation of multiple bed height differences.

diff -r 1642e08d14d2 -r 165086b1e66d artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java	Wed Jun 05 18:03:21 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java	Thu Jun 06 10:55:14 2013 +0200
@@ -52,7 +52,7 @@
         if (differenceArtifactIds == null) {
             String [] diffs = getDiffs();
             differenceArtifactIds = new String[diffs.length/2][2];
-            for (int i = 0; i < diffs.length; i += 2) {
+            for (int i = 0; i < diffs.length/2; i++) {
                 String diff1 = StringUtil.unbracket(diffs[0 + 2*i]);
                 String diff2 = StringUtil.unbracket(diffs[1 + 2*i]);
                 String[] diff1parts = diff1.split(";");
@@ -61,7 +61,7 @@
                     logger.debug("creating 2 artifacts." + diff1parts[0] + "; " + diff2parts[0]);
                 }
                 differenceArtifactIds[i][0] = diff1parts[0];
-                differenceArtifactIds[i][1] = diff1parts[1];
+                differenceArtifactIds[i][1] = diff2parts[0];
             }
         }
 


More information about the Dive4elements-commits mailing list