[PATCH] Don't die if only one year is selected for SedimentLoad calculation
Wald Commits
scm-commit at wald.intevation.org
Thu Mar 19 10:38:16 CET 2015
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1426757892 -3600
# Node ID 9fa5c66073e77452fadffadc2ed0649a1f251b2a
# Parent 060d732b32b6fd87c78dc923b31687ee47edff42
Don't die if only one year is selected for SedimentLoad calculation
The calculation can handle this now.
diff -r 060d732b32b6 -r 9fa5c66073e7 artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java Wed Mar 18 18:59:17 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java Thu Mar 19 10:38:12 2015 +0100
@@ -47,7 +47,7 @@
SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact);
// Second year should be later than first.
- if (access.getYears() != null && access.getYears()[1] < access.getYears()[0])
+ if (access.getYears() == null || access.getYears().length == 0)
throw new IllegalArgumentException("error_years_wrong");
return true;
More information about the Dive4Elements-commits
mailing list