[Dive4elements-commits] [PATCH 2 of 2] BundesWasserStrassenParser: Accept ',' and '; ' as separator

Wald Commits scm-commit at wald.intevation.org
Wed Feb 27 10:26:11 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1361957593 -3600
# Node ID cf50783542a19260a26001f3d1e15f0c77bc5ee1
# Parent  a929d9a9fa1ee8c8130d45933111a894e351d1f9
BundesWasserStrassenParser: Accept ',' and ';' as separator.

diff -r a929d9a9fa1e -r cf50783542a1 flys-backend/src/main/java/de/intevation/flys/importer/parsers/BundesWasserStrassenParser.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/BundesWasserStrassenParser.java	Tue Feb 26 12:35:59 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/BundesWasserStrassenParser.java	Wed Feb 27 10:33:13 2013 +0100
@@ -49,9 +49,13 @@
     @Override
     protected void handleLine(int lineNum, String line) {
         String[] vals = line.split(",");
+        // Try both "," and ";" as separator.
         if (vals.length != 2) {
-            logger.warn("Invalid bwastr-id line:\n" + line);
-            return;
+            vals = line.split(";");
+            if (vals.length != 2) {
+                logger.warn("Invalid bwastr-id line:\n" + line);
+                return;
+            }
         }
         try{
             String name = unwrap(vals[0].toLowerCase());


More information about the Dive4elements-commits mailing list