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 159948 Details for
Bug 302949
JavaModelManager hangs accessing the nonChainingJars set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updated patch
patch_302949.txt (text/plain), 2.70 KB, created by
Jay Arthanareeswaran
on 2010-02-23 11:32:25 EST
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Jay Arthanareeswaran
Created:
2010-02-23 11:32:25 EST
Size:
2.70 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/JavaModelManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java,v >retrieving revision 1.443 >diff -u -r1.443 JavaModelManager.java >--- model/org/eclipse/jdt/internal/core/JavaModelManager.java 15 Feb 2010 20:20:48 -0000 1.443 >+++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 23 Feb 2010 16:17:43 -0000 >@@ -1378,7 +1378,7 @@ > /* > * List of IPath of jars that are known to not contain a chaining (through MANIFEST.MF) to another library > */ >- private HashSet nonChainingJars; >+ private Set nonChainingJars; > > /** > * Update the classpath variable cache >@@ -2868,8 +2868,8 @@ > } > } > >- private HashSet loadNonChainingJarsCache() { >- HashSet nonChainingJarsCache = new HashSet(); >+ private Set loadNonChainingJarsCache() { >+ Set nonChainingJarsCache = Collections.synchronizedSet(new HashSet()); > File nonChainingJarsFile = getNonChainingJarsFile(); > DataInputStream in = null; > try { >@@ -2898,10 +2898,10 @@ > return JavaCore.getPlugin().getStateLocation().append("nonChainingJarsCache").toFile(); //$NON-NLS-1$ > } > >- private HashSet getNonChainingJarsCache() throws CoreException { >+ private Set getNonChainingJarsCache() throws CoreException { > if (this.nonChainingJars != null) > return this.nonChainingJars; >- HashSet result = new HashSet(); >+ Set result = Collections.synchronizedSet(new HashSet()); > IJavaProject[] projects = getJavaModel().getJavaProjects(); > for (int i = 0, length = projects.length; i < length; i++) { > IJavaProject javaProject = projects[i]; >@@ -3716,12 +3716,14 @@ > DataOutputStream out = null; > try { > out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(file))); >- HashSet nonChainingJarsCache = getNonChainingJarsCache(); >- out.writeInt(nonChainingJarsCache.size()); >- Iterator entries = nonChainingJarsCache.iterator(); >- while (entries.hasNext()) { >- IPath path = (IPath) entries.next(); >- out.writeUTF(path.toPortableString()); >+ Set nonChainingJarsCache = getNonChainingJarsCache(); >+ synchronized (nonChainingJarsCache) { >+ out.writeInt(nonChainingJarsCache.size()); >+ Iterator entries = nonChainingJarsCache.iterator(); >+ while (entries.hasNext()) { >+ IPath path = (IPath) entries.next(); >+ out.writeUTF(path.toPortableString()); >+ } > } > } catch (IOException e) { > IStatus status = new Status(IStatus.ERROR, JavaCore.PLUGIN_ID, IStatus.ERROR, "Problems while saving non-chaining jar cache", e); //$NON-NLS-1$
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
Flags:
srikanth_sankaran
:
review+
Actions:
View
|
Diff
Attachments on
bug 302949
:
159734
| 159948