[Dive4elements-commits] [PATCH] Bedheight parser: handle whitespace in metaline

Wald Commits scm-commit at wald.intevation.org
Fri Jun 7 17:52:13 CEST 2013


# HG changeset patch
# User Tom Gottfried <tom.gottfried at intevation.de>
# Date 1370620330 -7200
# Node ID c2c5ac7c174300fa56b038a2b9a249d711b4fae2
# Parent  02ea1c3fba8c96439a63e2eb3dd0fcf7d6d3809c
Bedheight parser: handle whitespace in metaline

diff -r 02ea1c3fba8c -r c2c5ac7c1743 backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java	Fri Jun 07 17:09:26 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java	Fri Jun 07 17:52:10 2013 +0200
@@ -345,7 +345,7 @@
         Matcher m = META_TYPE.matcher(line);
 
         if (m.matches()) {
-            String tmp = m.group(1).replace(";", "");
+            String tmp = m.group(1).replace(";", "").trim();
 
             BedHeightType bht = BedHeightType.fetchBedHeightTypeForType(
 		tmp, ImporterSession.getInstance().getDatabaseSession());


More information about the Dive4elements-commits mailing list