# HG changeset patch # User Sascha L. Teichmann # Date 1347554042 0 # Node ID 90f91ba077a858aad4a1ee5efb5662d82de0cc7a # Parent 0f99e9f1a2ca0ad0580e455b74e027c115f5959f Made importer more robust flys-backend/trunk@5461 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 0f99e9f1a2ca -r 90f91ba077a8 flys-backend/ChangeLog --- a/flys-backend/ChangeLog Thu Sep 13 10:53:34 2012 +0000 +++ b/flys-backend/ChangeLog Thu Sep 13 16:34:02 2012 +0000 @@ -1,3 +1,8 @@ +2012-09-12 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/importer/parsers/BedHeightParser.java: + Made code more robust. + 2012-09-12 Sascha L. Teichmann * src/main/java/de/intevation/flys/importer/Config.java: diff -r 0f99e9f1a2ca -r 90f91ba077a8 flys-backend/src/main/java/de/intevation/flys/importer/parsers/BedHeightParser.java --- 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;