Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayaprakash Arthanareeswaran2012-01-20 05:07:27 +0000
committerJayaprakash Arthanareeswaran2012-01-20 05:07:27 +0000
commitde08ae3ac42ace8070739ebb7715adc6c4ed1304 (patch)
tree7c9033be6274fba34672acc3bc2cd98d93b7e2c7
parenteb40a119cd5ecacf8e90c38261ec37c99b5a07b7 (diff)
downloadeclipse.jdt.core-de08ae3ac42ace8070739ebb7715adc6c4ed1304.tar.gz
eclipse.jdt.core-de08ae3ac42ace8070739ebb7715adc6c4ed1304.tar.xz
eclipse.jdt.core-de08ae3ac42ace8070739ebb7715adc6c4ed1304.zip
HEAD - Fix for bug 368152: ConcurrentModificationException on startup in
ExternalFoldersManager.createPendingFolders
-rw-r--r--org.eclipse.jdt.core/buildnotes_jdt-core.html4
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java18
2 files changed, 13 insertions, 9 deletions
diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html
index 7338f1004c..215a66af8f 100644
--- a/org.eclipse.jdt.core/buildnotes_jdt-core.html
+++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html
@@ -51,7 +51,9 @@ Eclipse SDK 3.8.0 - %date% - 3.8.0 M5
<h2>What's new in this drop</h2>
<h3>Problem Reports Fixed</h3>
-<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=365582">365582</a>
+<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=368152">368152</a>
+ConcurrentModificationException on startup in ExternalFoldersManager.createPendingFolders
+<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=365582">365582</a>
FUP of bug 361938: Other error code pattern
<br><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=365662">365662</a>
[compiler][null] warn on contradictory and redundant null annotations
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
index d6156980e7..192d0973d4 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ExternalFoldersManager.java
@@ -122,7 +122,7 @@ public class ExternalFoldersManager {
} while (result.exists());
if (scheduleForCreation) {
if (this.pendingFolders == null)
- this.pendingFolders = new HashSet();
+ this.pendingFolders = Collections.synchronizedSet(new HashSet());
this.pendingFolders.add(externalFolderPath);
}
knownFolders.put(externalFolderPath, result);
@@ -166,13 +166,15 @@ public class ExternalFoldersManager {
catch(CoreException e) {
throw new JavaModelException(e);
}
- Iterator iterator = this.pendingFolders.iterator();
- while (iterator.hasNext()) {
- Object folderPath = iterator.next();
- try {
- createLinkFolder((IPath) folderPath, false, externalFoldersProject, monitor);
- } catch (CoreException e) {
- Util.log(e, "Error while creating a link for external folder :" + folderPath); //$NON-NLS-1$
+ synchronized (this.pendingFolders) {
+ Iterator iterator = this.pendingFolders.iterator();
+ while (iterator.hasNext()) {
+ Object folderPath = iterator.next();
+ try {
+ createLinkFolder((IPath) folderPath, false, externalFoldersProject, monitor);
+ } catch (CoreException e) {
+ Util.log(e, "Error while creating a link for external folder :" + folderPath); //$NON-NLS-1$
+ }
}
}
this.pendingFolders.clear();

Back to the top