diff options
author | Sarika Sinha | 2016-03-07 10:09:27 +0000 |
---|---|---|
committer | Sarika Sinha | 2016-03-07 10:12:10 +0000 |
commit | 35bbbefa70b747bdbf88ce0dea5e2c36c9f01335 (patch) | |
tree | 3689bd58a558878a51f03532d0b1a87c91287b18 | |
parent | 071befd701b955f0ad6580c230caa269273b11d6 (diff) | |
download | eclipse.platform.debug-35bbbefa70b747bdbf88ce0dea5e2c36c9f01335.tar.gz eclipse.platform.debug-35bbbefa70b747bdbf88ce0dea5e2c36c9f01335.tar.xz eclipse.platform.debug-35bbbefa70b747bdbf88ce0dea5e2c36c9f01335.zip |
Bug 488838 - NPE during launching in Debug Perspective
Change-Id: Ibe6c1c3592a06965162a46799a8c8076697e46a4
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java index 0eee2539e..bc84e46db 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java @@ -246,7 +246,12 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis ListenerList<IDebugContextListener> listenerList = fListenersByPartId.get(id); return listenerList != null ? listenerList : new ListenerList<IDebugContextListener>(); } else { - ListenerList<IDebugContextListener> retVal = fListenersByPartId.get(null); + ListenerList<IDebugContextListener> listenerList = fListenersByPartId.get(null); + ListenerList<IDebugContextListener> retVal = new ListenerList<>(); + for (IDebugContextListener iDebugContextListener : listenerList) { + retVal.add(iDebugContextListener); + } + outer: for (Iterator<String> itr = fListenersByPartId.keySet().iterator(); itr.hasNext();) { String listenerPartId = itr.next(); for (int i = 0; i < fProviders.size(); i++) { @@ -257,9 +262,8 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis continue outer; } } - - for (IDebugContextListener iDebugContextListener : fListenersByPartId.get(listenerPartId)) { - inner: for (IDebugContextListener addedListener : retVal) { + inner: for (IDebugContextListener iDebugContextListener : fListenersByPartId.get(listenerPartId)) { + for (IDebugContextListener addedListener : retVal) { if (iDebugContextListener.equals(addedListener)){ continue inner; } |