Skip to content

Commit

Permalink
CPP-7354 ConcurrentModificationException in debugger when several wat…
Browse files Browse the repository at this point in the history
…chpoints are added - fix in debugger platform
  • Loading branch information
gorrus committed Aug 11, 2016
1 parent 0825b39 commit 489bfee
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,15 @@ public XBreakpointBase<?,?,?>[] getAllBreakpoints() {
@NotNull
public <B extends XBreakpoint<?>> Collection<? extends B> getBreakpoints(@NotNull final XBreakpointType<B,?> type) {
ApplicationManager.getApplication().assertReadAccessAllowed();
Collection<? extends XBreakpointBase<?,?,?>> breakpoints = myBreakpoints.get(type);
Collection<? extends B> regular = breakpoints != null ? Collections.unmodifiableCollection((Collection<? extends B>)breakpoints) : Collections.emptyList();

final XBreakpointBase<?, ?, ?> defaultBreakpoint = myDefaultBreakpoints.get(type);
if (defaultBreakpoint == null) return regular;
List<B> result = new ArrayList<>();
result.add((B)defaultBreakpoint);
result.addAll(regular);
B defaultBreakpoint = getDefaultBreakpoint(type);
if (defaultBreakpoint != null) {
result.add(defaultBreakpoint);
}
Collection<XBreakpointBase<?, ?, ?>> breakpoints = myBreakpoints.get(type);
if (breakpoints != null) {
result.addAll((Collection<? extends B>)breakpoints);
}
return result;
}

Expand Down

0 comments on commit 489bfee

Please sign in to comment.