Check if updated objects are null
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 7 Sep 2015 10:25:48 +0000 (12:25 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 7 Sep 2015 10:25:48 +0000 (12:25 +0200)
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/remoting/cache/CdmTransientEntityCacher.java

index 167300f3d81e23a110717d1fb7a125cc8e539f06..d92bdad5577d0abf554fe0730bbf2c54577dc058 100644 (file)
@@ -158,7 +158,7 @@ public class CdmTransientEntityCacher implements ICdmCacher {
         // if the cdm identifier set contains identifiers of objects already
         // present in the updated objects set reomve them
         for(CdmBase updatedObject : updatedObjects) {
-            if(exists(new CdmEntityCacheKey(updatedObject.getClass(), updatedObject.getId()))) {
+            if(updatedObject != null && exists(new CdmEntityCacheKey(updatedObject.getClass(), updatedObject.getId()))) {
                 CdmEntityIdentifier cdmEntityIdentifier = new CdmEntityIdentifier(updatedObject.getId(), updatedObject.getClass());
                 if(!updatedCdmIdsIsEmpty && updatedCdmIds.contains(cdmEntityIdentifier)) {
                     updatedCdmIds.remove(cdmEntityIdentifier);