[Lada-commits] [PATCH 1 of 2] Avoid NPE in TimestampLocker

Wald Commits scm-commit at wald.intevation.org
Thu Nov 10 13:50:04 CET 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1478782126 -3600
# Node ID 67a85c6a7474e19be299ed711ec73abe6e1c7788
# Parent  7d3adb0834f5f76499587e748b46160b807c09d3
Avoid NPE in TimestampLocker.

diff -r 7d3adb0834f5 -r 67a85c6a7474 src/main/java/de/intevation/lada/lock/TimestampLocker.java
--- a/src/main/java/de/intevation/lada/lock/TimestampLocker.java	Wed Nov 09 16:32:29 2016 +0100
+++ b/src/main/java/de/intevation/lada/lock/TimestampLocker.java	Thu Nov 10 13:48:46 2016 +0100
@@ -111,6 +111,9 @@
         try {
             m = o.getClass().getMethod("getParentModified");
             Timestamp ot = (Timestamp)m.invoke(o);
+            if (ot == null) {
+                return true;
+            }
             return t.getTime() > ot.getTime();
         } catch (NoSuchMethodException | SecurityException |
                  IllegalAccessException | IllegalArgumentException|


More information about the Lada-commits mailing list