changeset 714:1d05fc809fb4

Fixed possible NPE.
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 27 Jul 2015 12:57:35 +0200
parents d8e421d9d7ec
children 261095b700a0
files src/main/java/de/intevation/lada/validation/rules/messung/MessgroesseToMessmethode.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/validation/rules/messung/MessgroesseToMessmethode.java	Mon Jul 27 12:57:12 2015 +0200
+++ b/src/main/java/de/intevation/lada/validation/rules/messung/MessgroesseToMessmethode.java	Mon Jul 27 12:57:35 2015 +0200
@@ -65,8 +65,8 @@
             (List<MmtMessgroesse>)results.getData();
         List<MmtMessgroesse> found = new ArrayList<MmtMessgroesse>();
         for (MmtMessgroesse mg: messgroessen) {
-            if (mmt.equals(mg.getMmtMessgroessePK().getMmtId())) {
-                logger.debug("found: " + mg.getMmtMessgroessePK().getMmtId() + " for " + mmt);
+            if (mg.getMmtMessgroessePK() != null &&
+                mg.getMmtMessgroessePK().getMmtId().equals(mmt)) {
                 found.add(mg);
             }
         }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)