Mercurial > dive4elements > river
changeset 8591:9fa5c66073e7
Don't die if only one year is selected for SedimentLoad calculation
The calculation can handle this now.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 19 Mar 2015 10:38:12 +0100 |
parents | 060d732b32b6 |
children | 36faef4f8acb |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;