Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Recoskie2011-05-02 19:34:51 +0000
committerChris Recoskie2011-05-02 19:34:51 +0000
commitdff7d999fc01a3d54044ce9cd949e26ab118137e (patch)
tree59ffc4d202f30b9246f09b8357917e70bee92941
parentf88c1e14b60e1c7ea8db28cc95c110e381eeed25 (diff)
downloadorg.eclipse.cdt-201105021546.tar.gz
org.eclipse.cdt-201105021546.tar.xz
org.eclipse.cdt-201105021546.zip
Bug 133881 - Make refreshing after building optionalv201105021546
Fix ConcurrentModificationException in clearExclusionsForProject()
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/RefreshScopeManager.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/RefreshScopeManager.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/RefreshScopeManager.java
index f5e603d1ed6..5042091ad2f 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/RefreshScopeManager.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/resources/RefreshScopeManager.java
@@ -538,19 +538,25 @@ public class RefreshScopeManager {
fResourceToExclusionsMap.put(resource, exclusions);
}
- public void clearAllExclusions() {
+ public synchronized void clearAllExclusions() {
if(fResourceToExclusionsMap != null)
fResourceToExclusionsMap.clear();
}
public synchronized void clearExclusionsForProject(IProject project) {
getResourcesToExclusionsMap();
+ List<IResource> resourcesToRemove = new LinkedList<IResource>();
+
for(IResource resource : fResourceToExclusionsMap.keySet()) {
IProject project2 = resource.getProject();
if(project2.equals(project)) {
- fResourceToExclusionsMap.remove(resource);
+ resourcesToRemove.add(resource);
}
}
+
+ for(IResource resource : resourcesToRemove) {
+ fResourceToExclusionsMap.remove(resource);
+ }
}
private synchronized void clearDataForProject(IProject project) {

Back to the top