[Lada-commits] [PATCH 2 of 2] Fixed NPE in probe validation rule

Wald Commits scm-commit at wald.intevation.org
Wed Jul 22 16:03:54 CEST 2015


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1437573813 -7200
# Node ID f02862b1862df0d2d6c6d6af89dbb4a551c97178
# Parent  3ec358698b4d51d502aa1e29bfd9bcfc5569e943
Fixed NPE in probe validation rule.

diff -r 3ec358698b4d -r f02862b1862d src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java
--- a/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java	Wed Jul 22 16:03:03 2015 +0200
+++ b/src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java	Wed Jul 22 16:03:33 2015 +0200
@@ -43,6 +43,9 @@
         if (probe.getMediaDesk() == null || probe.getMediaDesk().equals("")) {
             return null;
         }
+        if (probe.getUmwId() == null) {
+            return null;
+        }
         String[] mediaDesk = probe.getMediaDesk().split(" ");
         if (mediaDesk.length <= 1) {
             return null;


More information about the Lada-commits mailing list