Mercurial > dive4elements > river
changeset 9194:c373909fb7ca
Fixed: used java 7 feature although java 6 comliance level is configured
author | gernotbelger |
---|---|
date | Fri, 29 Jun 2018 13:09:29 +0200 |
parents | f6b7837b89aa |
children | 87c08fa2da86 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/UedauernPropertiesHelper.java |
diffstat | 1 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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) {