diff flys-backend/src/main/java/de/intevation/flys/importer/parsers/BedHeightParser.java @ 3798:90f91ba077a8

Made importer more robust flys-backend/trunk@5461 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 13 Sep 2012 16:34:02 +0000
parents 0d27d02b1208
children aed7aba93718
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/BedHeightParser.java	Thu Sep 13 10:53:34 2012 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/BedHeightParser.java	Thu Sep 13 16:34:02 2012 +0000
@@ -328,11 +328,15 @@
         if (m.matches()) {
             String tmp = m.group(1).replace(";", "");
 
-            obj.setType(new ImportBedHeightType(
-                BedHeightType.getBedHeightName(tmp),
-                tmp));
+            String name = BedHeightType.getBedHeightName(tmp);
 
-            return true;
+            if (name != null) {
+                obj.setType(new ImportBedHeightType(name, tmp));
+                return true;
+            }
+            else {
+                log.warn("Unknown bed height type: '" + tmp + "'");
+            }
         }
 
         return false;

http://dive4elements.wald.intevation.org