Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2005-10-25 19:43:27 +0000
committerDarin Wright2005-10-25 19:43:27 +0000
commitdb34bfe0e86a33a8940e417f35aa26df0b853ce5 (patch)
tree888358b8235d8c307afa0b689b71fd9106661ca3 /org.eclipse.debug.core
parent41d20a80b9b2a8fb0c0ddcd23eaef7b208e3d556 (diff)
downloadeclipse.platform.debug-db34bfe0e86a33a8940e417f35aa26df0b853ce5.tar.gz
eclipse.platform.debug-db34bfe0e86a33a8940e417f35aa26df0b853ce5.tar.xz
eclipse.platform.debug-db34bfe0e86a33a8940e417f35aa26df0b853ce5.zip
Bug 112553 - ConcurrentModificationException in BreakpointManager
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
index 78ad0ec9b..1ff3dbd59 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
@@ -279,7 +279,7 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
* of the workspace until a request is made to retrieve the
* breakpoints.
*/
- private Vector getBreakpoints0() {
+ private synchronized Vector getBreakpoints0() {
if (fBreakpoints == null) {
initializeBreakpoints();
}
@@ -291,16 +291,18 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
*/
public IBreakpoint[] getBreakpoints(String modelIdentifier) {
Vector allBreakpoints= getBreakpoints0();
- ArrayList temp= new ArrayList(allBreakpoints.size());
- Iterator breakpoints= allBreakpoints.iterator();
- while (breakpoints.hasNext()) {
- IBreakpoint breakpoint= (IBreakpoint) breakpoints.next();
- String id= breakpoint.getModelIdentifier();
- if (id != null && id.equals(modelIdentifier)) {
- temp.add(breakpoint);
+ synchronized (allBreakpoints) {
+ ArrayList temp= new ArrayList(allBreakpoints.size());
+ Iterator breakpoints= allBreakpoints.iterator();
+ while (breakpoints.hasNext()) {
+ IBreakpoint breakpoint= (IBreakpoint) breakpoints.next();
+ String id= breakpoint.getModelIdentifier();
+ if (id != null && id.equals(modelIdentifier)) {
+ temp.add(breakpoint);
+ }
}
+ return (IBreakpoint[]) temp.toArray(new IBreakpoint[temp.size()]);
}
- return (IBreakpoint[]) temp.toArray(new IBreakpoint[temp.size()]);
}
/**

Back to the top