Bug 64170 - Classpath reentrance protection is not thread-safe
Summary: Classpath reentrance protection is not thread-safe
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 RC1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-26 12:52 EDT by Philipe Mulet CLA
Modified: 2004-05-31 17:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2004-05-26 12:52:55 EDT
Build 3.0M9

The following code for protecting reentering CP resolution should use a thread 
local to allow multiple thread to get an accurate value (and not an empty CP 
if calling at wrong time).

				IClasspathEntry[] infoPath = 
perProjectInfo.resolvedClasspath;
				if (infoPath != null && 
(returnResolutionInProgress || infoPath != RESOLUTION_IN_PROGRESS)) {
					if 
(JavaModelManager.CP_RESOLVE_VERBOSE) {
						if (infoPath == 
RESOLUTION_IN_PROGRESS) {
						    Util.verbose
("CPResolution: Reentering Raw Classpath Resolution for project: "+ 
this.getElementName() + "\n  will use empty classpath instead");  //$NON-NLS-1
$ //$NON-NLS-2$
						    new Exception("TRACE OF 
REENTERING CALL").printStackTrace(System.out);  //$NON-NLS-1$
						}
					}				
		
					return infoPath;
				}
Comment 1 Jerome Lanneluc CLA 2004-05-27 10:35:11 EDT
Changed JavaProject#getResolvedClasspath(boolean, boolean, boolean) to use a 
thread local HashSet (stored on the JavaModelManager). This set contains the 
Java projects whose classpath is being resolved.
Comment 2 Olivier Thomann CLA 2004-05-28 16:05:12 EDT
Jerome, could you please verify this one? I don't know exactly what I am suppose
to verify.
Comment 3 Jerome Lanneluc CLA 2004-05-31 17:24:26 EDT
Verified