diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse')
3 files changed, 6 insertions, 7 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java index 871c84a2c..8d89714e7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenCountUpdate.java @@ -232,9 +232,7 @@ class ChildrenCountUpdate extends ViewerUpdateMonitor implements IChildrenCountU protected boolean doEquals(ViewerUpdateMonitor update) { return update instanceof ChildrenCountUpdate && - // Bug 380288 - workaround a race condition where update is initialized with null input. - ((getViewerInput() == null && update.getViewerInput() == null) || - (getViewerInput() != null && getViewerInput().equals(update.getViewerInput()))) && + getViewerInput().equals(update.getViewerInput()) && getElementPath().equals(getElementPath()); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java index 07351334e..6397a2bdc 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ChildrenUpdate.java @@ -223,16 +223,13 @@ public class ChildrenUpdate extends ViewerUpdateMonitor implements IChildrenUpda update instanceof ChildrenUpdate && ((ChildrenUpdate)update).getOffset() == getOffset() && ((ChildrenUpdate)update).getLength() == getLength() && - // Bug 380288 - workaround a race condition where update is initialized with null input. - ((getViewerInput() == null && update.getViewerInput() == null) || - (getViewerInput() != null && getViewerInput().equals(update.getViewerInput()))) && + getViewerInput().equals(update.getViewerInput()) && getElementPath().equals(getElementPath()); } protected int doHashCode() { return (int)Math.pow( (getClass().hashCode() + getViewerInput().hashCode() + getElementPath().hashCode()) * (getOffset() + 2), - getLength() + 2); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java index f488f32e6..b95ffa248 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java @@ -426,6 +426,10 @@ public class TreeModelContentProvider implements ITreeModelContentProvider, ICon } public void updateModel(IModelDelta delta, int mask) { + // Processing deltas with null input leads to NPEs + // (Bug 380288 - NPE switching to the Breakpoints View) + if (getViewer() == null || getViewer().getInput() == null) return; + IModelDelta[] deltaArray = new IModelDelta[] { delta }; updateNodes(deltaArray, mask & (IModelDelta.REMOVED | IModelDelta.UNINSTALL)); updateNodes(deltaArray, mask & ITreeModelContentProvider.UPDATE_MODEL_DELTA_FLAGS |