Skip to content

Commit

Permalink
Fix NPEs in ModelEventImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Apr 3, 2020
1 parent 0c4b90e commit e255cf8
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -236,7 +236,7 @@ public boolean hasContentToShow(boolean watchAuxiliaryAttributes) {
ObjectDelta<? extends ObjectType> summarizedDelta;
try {
summarizedDelta = getSummarizedFocusDeltas();
if (!summarizedDelta.isModify()) {
if (!ObjectDelta.isModify(summarizedDelta)) {
return true;
} else if (!getTextFormatter().containsVisibleModifiedItems(summarizedDelta.getModifications(),
false, watchAuxiliaryAttributes)) {
Expand All @@ -255,9 +255,9 @@ public boolean hasContentToShow(boolean watchAuxiliaryAttributes) {
public String getContentAsFormattedList(boolean showAuxiliaryAttributes) {
try {
ObjectDelta<? extends ObjectType> 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());
Expand Down

0 comments on commit e255cf8

Please sign in to comment.