Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Swanson2001-09-17 16:08:36 +0000
committerDarin Swanson2001-09-17 16:08:36 +0000
commit30c6a3ecb5c101d7d6ae5fd876077c3a3cbaffed (patch)
tree03fd8506349d1dac5d624425e9290a3c9c4ec459
parentdcfe02d264455a207ed342e9f5f05c6447fa3046 (diff)
downloadeclipse.platform.debug-30c6a3ecb5c101d7d6ae5fd876077c3a3cbaffed.tar.gz
eclipse.platform.debug-30c6a3ecb5c101d7d6ae5fd876077c3a3cbaffed.tar.xz
eclipse.platform.debug-30c6a3ecb5c101d7d6ae5fd876077c3a3cbaffed.zip
1GJL83H: ITPDUI:ALL - Concurrent Modification
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java26
1 files changed, 14 insertions, 12 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index 2fa0a6f51..fa79f4762 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -67,13 +67,14 @@ public class LaunchManager extends PlatformObject implements ILaunchManager {
* @see ILaunchManager
*/
public ILaunch findLaunch(IProcess process) {
- Iterator list= fLaunches.iterator();
- while (list.hasNext()) {
- ILaunch l= (ILaunch) list.next();
- IProcess[] ps= l.getProcesses();
- for (int i= 0; i < ps.length; i++) {
- if (ps[i].equals(process)) {
- return l;
+ synchronized (fLaunches) {
+ for (int i= 0; i < fLaunches.size(); i++) {
+ ILaunch l= (ILaunch) fLaunches.elementAt(i);
+ IProcess[] ps= l.getProcesses();
+ for (int j= 0; j < ps.length; j++) {
+ if (ps[j].equals(process)) {
+ return l;
+ }
}
}
}
@@ -84,11 +85,12 @@ public class LaunchManager extends PlatformObject implements ILaunchManager {
* @see ILaunchManager
*/
public ILaunch findLaunch(IDebugTarget target) {
- Iterator list= fLaunches.iterator();
- while (list.hasNext()) {
- ILaunch l= (ILaunch) list.next();
- if (target.equals(l.getDebugTarget())) {
- return l;
+ synchronized (fLaunches) {
+ for (int i= 0; i < fLaunches.size(); i++) {
+ ILaunch l= (ILaunch) fLaunches.elementAt(i);
+ if (target.equals(l.getDebugTarget())) {
+ return l;
+ }
}
}
return null;

Back to the top