[Dive4elements-commits] [PATCH] Historical discharge curves: Fixed NPE

Wald Commits scm-commit at wald.intevation.org
Mon May 6 17:42:51 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1367854966 -7200
# Node ID 1272d52e052e5da844029e9e6cfd184606f03247
# Parent  c2f51d283ee23497b30edf7a98cae85e43a3eb97
Historical discharge curves: Fixed NPE.

diff -r c2f51d283ee2 -r 1272d52e052e artifacts/src/main/java/org/dive4elements/river/artifacts/states/GaugeTimerangeState.java
--- 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];


More information about the Dive4elements-commits mailing list