changeset 6753:e032e9e6d09e

issue1433: Include trailing empty strings in stringsplit, this prevents emission of false warnings.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 06 Aug 2013 11:06:25 +0200
parents f275aae00c55
children f3730c727473 91c43293e538
files backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelDifferencesParser.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelDifferencesParser.java	Tue Aug 06 10:54:41 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelDifferencesParser.java	Tue Aug 06 11:06:25 2013 +0200
@@ -203,7 +203,8 @@
      * @param line the line to parse
      */
     private void handleDataLine(String line) {
-        String[] cols = line.split(SEPERATOR_CHAR);
+        // Split by separator, do not exclude trailing empty string.
+        String[] cols = line.split(SEPERATOR_CHAR, -1);
 
         if (cols == null || cols.length < 2) {
             log.warn("skip invalid waterlevel-diff line: '" + line + "'");

http://dive4elements.wald.intevation.org