changeset 5904:1272d52e052e

Historical discharge curves: Fixed NPE.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 06 May 2013 17:42:46 +0200
parents c2f51d283ee2
children 0c61dba8c0de
files artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java	Mon May 06 13:10:16 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java	Mon May 06 17:42:46 2013 +0200
@@ -56,7 +56,7 @@
 
         List<?> results = query.list();
 
-        if (results != null) {
+        if (!results.isEmpty()) {
             Object[] res = (Object[]) results.get(0);
 
             Calendar lo = (Calendar) res[0];

http://dive4elements.wald.intevation.org