[PATCH 2 of 2] Merge

Wald Commits scm-commit at wald.intevation.org
Fri Jun 29 14:55:03 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1530276880 -7200
# Node ID 87c08fa2da8674c28c78b4db3374e5dfc7b8056c
# Parent  a4121ec450d6b246403262a203f4174797e14345
# Parent  c373909fb7ca38b352dfa4b932895485d2892b11
Merge

diff -r a4121ec450d6 -r 87c08fa2da86 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/DefaultBedHeights.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/DefaultBedHeights.java	Fri Jun 29 14:52:54 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/DefaultBedHeights.java	Fri Jun 29 14:54:40 2018 +0200
@@ -91,9 +91,7 @@
 
             return Arrays.asList(split);
         }
-        catch (
-
-        final Exception e) {
+        catch (final Exception e) {
             e.printStackTrace();
             problems.addProblem("sinfo.bedheightsfinder.configfile.loaderror", CONFIG_FILE, e.getMessage());
             return Collections.emptyList();
diff -r a4121ec450d6 -r 87c08fa2da86 artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/UedauernPropertiesHelper.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/UedauernPropertiesHelper.java	Fri Jun 29 14:52:54 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/UedauernPropertiesHelper.java	Fri Jun 29 14:54:40 2018 +0200
@@ -9,6 +9,7 @@
  */
 package org.dive4elements.river.artifacts.uinfo.inundationduration;
 
+import java.io.IOException;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -69,7 +70,12 @@
 
     private Properties getProperties() {
         if (this.properties == null) {
-            this.properties = Config.loadProperties(this.CONFIG_FILE);
+            try {
+                this.properties = Config.loadProperties(this.CONFIG_FILE);
+            }
+            catch (final IOException e) {
+                e.printStackTrace();
+            }
         }
         return this.properties;
     }
@@ -112,11 +118,14 @@
     }
 
     public static boolean fileExistsForRiver(final String river) {
-        final Properties properties = Config.loadProperties(makeFileName(river));
-        if (properties.size() == 0) {
+        try {
+            Config.loadProperties(makeFileName(river));
+            return true;
+        }
+        catch (final IOException e) {
+            e.printStackTrace();
             return false;
         }
-        return true;
     }
 
     public String getScenarioUrlFromYear(final Integer year, final Integer dMwspl) {


More information about the Dive4Elements-commits mailing list