[Lada-commits] [PATCH 2 of 4] Fixed possible NPE
Wald Commits
scm-commit at wald.intevation.org
Mon Jul 27 12:58:43 CEST 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1437994655 -7200
# Node ID 1d05fc809fb421ea1406b7e85beb8e29f262c1cc
# Parent d8e421d9d7ec3872006df14a6e990ef561f78039
Fixed possible NPE.
diff -r d8e421d9d7ec -r 1d05fc809fb4 src/main/java/de/intevation/lada/validation/rules/messung/MessgroesseToMessmethode.java
--- 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);
}
}
More information about the Lada-commits
mailing list