[Dive4elements-commits] [PATCH 5 of 5] Wst: Avoid NPE
Wald Commits
scm-commit at wald.intevation.org
Fri Apr 26 11:06:12 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1366967338 -7200
# Node ID df5d29987df80d4e71cec38ab34b05a0fdfd1d4b
# Parent a0a7a8f3bd4a2f9a220e98a3c565630e15ef21bf
Wst: Avoid NPE.
diff -r a0a7a8f3bd4a -r df5d29987df8 backend/src/main/java/org/dive4elements/river/model/Wst.java
--- a/backend/src/main/java/org/dive4elements/river/model/Wst.java Fri Apr 26 11:06:55 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/Wst.java Fri Apr 26 11:08:58 2013 +0200
@@ -185,6 +185,11 @@
return null;
}
+ if (results.get(0)[0] == null || results.get(0)[1] == null) {
+ logger.warn("Could not process result from min/maxQ query.");
+ return null;
+ }
+
Object [] result = results.get(0);
return new double [] {
More information about the Dive4elements-commits
mailing list