changeset 7417:cf8d37ed4d34

BedHeightSingleParser: fix no-data-line detection.
author Tom Gottfried <tom@intevation.de>
date Wed, 23 Oct 2013 09:59:46 +0200
parents f26e7d386d8c
children 6665d0e3d795
files backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java	Wed Oct 23 08:20:11 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java	Wed Oct 23 09:59:46 2013 +0200
@@ -62,9 +62,14 @@
         }
 
         // Handle gaps like "10,0;;;;;".
-        if (values.length == 1) {
+        if (values.length <= 2) {
             // Do not import line without useful data
-            return;
+            if (values.length < 2) {
+                return;
+            }
+            if (values[1].length() == 0) {
+                return;
+            }
         }
 
         Double height = null;

http://dive4elements.wald.intevation.org