changeset 6001:bd6d7da9c6fd

WQKmsFactory: prevent NPE.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 13 May 2013 11:16:28 +0200
parents 2e57fb04aa6f
children bcea24d8c2ec
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKmsFactory.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKmsFactory.java	Mon May 13 11:14:13 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQKmsFactory.java	Mon May 13 11:16:28 2013 +0200
@@ -147,6 +147,9 @@
         for (int i = 0, N = results.size(); i < N; i++) {
             Object[] row = results.get(i);
             // add(w, q, km)
+            if (row == null || row[0] == null || row[1] == null || row[2] == null) {
+                log.warn("A value in result for WQKms is null.");
+            }
             wqkms.add((Double) row[1], (Double) row[2], (Double) row[0]);
         }
 

http://dive4elements.wald.intevation.org