comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadYearSelect.java @ 5701:56897ceb5589

Avoid NPE.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 15 Apr 2013 11:53:48 +0200
parents fd020ac6f6cd
children
comparison
equal deleted inserted replaced
5700:4ed36858fe0f 5701:56897ceb5589
37 throws IllegalArgumentException 37 throws IllegalArgumentException
38 { 38 {
39 SedimentLoadAccess access = new SedimentLoadAccess((FLYSArtifact) artifact, null); 39 SedimentLoadAccess access = new SedimentLoadAccess((FLYSArtifact) artifact, null);
40 40
41 // Second year should be later than first. 41 // Second year should be later than first.
42 if (access.getPeriod()[1] < access.getPeriod()[0]) 42 if (access.getPeriod() != null && access.getPeriod()[1] < access.getPeriod()[0])
43 throw new IllegalArgumentException("error_years_wrong"); 43 throw new IllegalArgumentException("error_years_wrong");
44 44
45 return true; 45 return true;
46 } 46 }
47 } 47 }

http://dive4elements.wald.intevation.org