[PATCH] Importer, do not jump knowingly over the cliff

Wald Commits scm-commit at wald.intevation.org
Thu Apr 9 19:27:58 CEST 2015


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1428600474 -7200
# Node ID b44c76b6800c6437bb313d683ece9e93db6e1dd6
# Parent  571c0e4321bd9310241bde2d16d757700fc5ffe7
Importer, do not jump knowingly over the cliff.

diff -r 571c0e4321bd -r b44c76b6800c backend/src/main/java/org/dive4elements/river/importer/parsers/InfoGewParser.java
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/InfoGewParser.java	Thu Apr 09 18:20:55 2015 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/InfoGewParser.java	Thu Apr 09 19:27:54 2015 +0200
@@ -117,11 +117,11 @@
                         wst = new File(root, wstFilename);
                     }
                     wst = FileTools.repair(wst);
-                    log.info("Found wst file '" + wst + "'");
                     if (!wst.isFile() || !wst.canRead()) {
                         log.error("cannot access WST file '" + wstFilename + "'");
                         continue;
                     }
+                    log.info("Found wst file '" + wst + "'");
                     wstFile = wst;
                 }
                 else if ((m = GEW_UUID.matcher(line)).matches()) {
@@ -135,7 +135,7 @@
                     bbInfoFile = new File(normalize(bbInfo));
                 }
             }
-            if (riverName != null) {
+            if (riverName != null && wstFile != null) {
                 rivers.add(new ImportRiver(
                     riverName,
                     modelUuid,


More information about the Dive4Elements-commits mailing list