[PATCH] BedHeightSingleParser: do not omit lines if last column is empty

Wald Commits scm-commit at wald.intevation.org
Wed Oct 16 14:40:23 CEST 2013


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1381927219 -7200
# Node ID 809e76b7fe38c2a8ba0f0171edbb014188479a09
# Parent  c6825778de1fa0575854bd727253df26c6b5004e
BedHeightSingleParser: do not omit lines if last column is empty.

diff -r c6825778de1f -r 809e76b7fe38 backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java	Wed Oct 16 13:03:13 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java	Wed Oct 16 14:40:19 2013 +0200
@@ -39,10 +39,10 @@
      */
     @Override
     protected void handleDataLine(ImportBedHeight obj, String line) {
-        String[] values = line.split(SEPERATOR_CHAR);
+        String[] values = line.split(SEPERATOR_CHAR, -1);
 
-        if (values == null || (values.length != 1 && values.length < 6)) {
-            //log.warn("BSP: Error while parsing data line: '" + line + "'");
+        if (values == null) {
+            log.warn("BSP: Error while parsing data line: '" + line + "'");
             return;
         }
 


More information about the Dive4elements-commits mailing list