[PATCH] Fixed: used java 7 feature although java 6 comliance level is configured

Wald Commits scm-commit at wald.intevation.org
Fri Jun 29 13:09:34 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1530270569 -7200
# Node ID c373909fb7ca38b352dfa4b932895485d2892b11
# Parent  f6b7837b89aab0c5bf95306f1616eb177ce750e5
Fixed: used java 7 feature although java 6 comliance level is configured

diff -r f6b7837b89aa -r c373909fb7ca 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 12:46:17 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/UedauernPropertiesHelper.java	Fri Jun 29 13:09:29 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