From e255cf880a86379121e6edde3a4c06d331f9478b Mon Sep 17 00:00:00 2001 From: Pavol Mederly Date: Fri, 3 Apr 2020 14:47:50 +0200 Subject: [PATCH] Fix NPEs in ModelEventImpl --- .../midpoint/notifications/impl/events/ModelEventImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/ModelEventImpl.java b/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/ModelEventImpl.java index bb838da4bc1..88dd0554c42 100644 --- a/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/ModelEventImpl.java +++ b/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/events/ModelEventImpl.java @@ -236,7 +236,7 @@ public boolean hasContentToShow(boolean watchAuxiliaryAttributes) { ObjectDelta summarizedDelta; try { summarizedDelta = getSummarizedFocusDeltas(); - if (!summarizedDelta.isModify()) { + if (!ObjectDelta.isModify(summarizedDelta)) { return true; } else if (!getTextFormatter().containsVisibleModifiedItems(summarizedDelta.getModifications(), false, watchAuxiliaryAttributes)) { @@ -255,9 +255,9 @@ public boolean hasContentToShow(boolean watchAuxiliaryAttributes) { public String getContentAsFormattedList(boolean showAuxiliaryAttributes) { try { ObjectDelta summarizedDelta = getSummarizedFocusDeltas(); - if (summarizedDelta.isAdd()) { + if (ObjectDelta.isAdd(summarizedDelta)) { return getTextFormatter().formatObject(summarizedDelta.getObjectToAdd(), false, showAuxiliaryAttributes); - } else if (summarizedDelta.isModify()) { + } else if (ObjectDelta.isModify(summarizedDelta)) { ModelElementContext focusContext = modelContext.getFocusContext(); return getTextFormatter().formatObjectModificationDelta(summarizedDelta, false, showAuxiliaryAttributes, focusContext.getObjectOld(), focusContext.getObjectNew());