comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/SedimentLoadYearSelect.java @ 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 73a4c3c202e5
children 5e38e2924c07
comparison
equal deleted inserted replaced
8590:060d732b32b6 8591:9fa5c66073e7
45 throws IllegalArgumentException 45 throws IllegalArgumentException
46 { 46 {
47 SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact); 47 SedimentLoadAccess access = new SedimentLoadAccess((D4EArtifact) artifact);
48 48
49 // Second year should be later than first. 49 // Second year should be later than first.
50 if (access.getYears() != null && access.getYears()[1] < access.getYears()[0]) 50 if (access.getYears() == null || access.getYears().length == 0)
51 throw new IllegalArgumentException("error_years_wrong"); 51 throw new IllegalArgumentException("error_years_wrong");
52 52
53 return true; 53 return true;
54 } 54 }
55 } 55 }

http://dive4elements.wald.intevation.org