Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 214365 Details for
Bug 376724
ExternalFoldersManager still has synchronization gaps
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed fix
Fix-for-bug-376724.patch (text/plain), 1.54 KB, created by
Jay Arthanareeswaran
on 2012-04-23 03:02:46 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2012-04-23 03:02:46 EDT
Size:
1.54 KB
patch
obsolete
>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 9ad73c8..45b097d 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 >@@ -51,13 +51,17 @@ > private Set pendingFolders; // subset of keys of 'folders', for which linked folders haven't been created yet. > private int counter = 0; > /* Singleton instance */ >- private static ExternalFoldersManager MANAGER = new ExternalFoldersManager(); >+ private static ExternalFoldersManager MANAGER; > > private ExternalFoldersManager() { > // Prevent instantiation >+ getFolders(); > } > >- public static ExternalFoldersManager getExternalFoldersManager() { >+ public static synchronized ExternalFoldersManager getExternalFoldersManager() { >+ if (MANAGER == null) { >+ MANAGER = new ExternalFoldersManager(); >+ } > return MANAGER; > } > >@@ -123,8 +127,10 @@ > result = externalFoldersProject.getFolder(LINKED_FOLDER_NAME + this.counter++); > } while (result.exists()); > if (scheduleForCreation) { >- if (this.pendingFolders == null) >- this.pendingFolders = Collections.synchronizedSet(new HashSet()); >+ synchronized(this) { >+ if (this.pendingFolders == null) >+ this.pendingFolders = Collections.synchronizedSet(new HashSet()); >+ } > this.pendingFolders.add(externalFolderPath); > } > knownFolders.put(externalFolderPath, result);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 376724
:
214365
|
214487