Bug 35272

Summary: Inconsistent validation of CP entries
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 3.0 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2003-03-19 04:41:54 EST
Build RC2

When creating a variable CP entry, no check is made that the path is absolute, 
however, when attempting to set a classpath containing such an entry, it will 
fail validation then.

It could have been detected earlier.
Comment 1 Philipe Mulet CLA 2003-03-19 04:44:20 EST
Actually, the problem is slightly different. Issue comes from the fact that the 
variable value wasn't an absolute path. 

Variable settings should likely enforce an absolute path is used then, 
wondering though if source attachments are expecting absolute paths though

		JavaCore.setClasspathVariable("MyVar", new Path("P/lib"), null);
		IJavaProject proj =  this.createJavaProject("P", new String[] 
{}, "bin");
		this.createFolder("/P/lib");
		final int length = 200;
		IClasspathEntry[] classpath = new IClasspathEntry[length];
		for (int i = 0; i < length; i++){
			this.createFile("/P/lib/lib"+i+".jar", "");
			classpath[i] = JavaCore.newVariableEntry(new Path
("/MyVar/lib"+i+".jar"), null, null);
		}
		proj.setRawClasspath(classpath, null);
Comment 2 Philipe Mulet CLA 2003-03-19 04:44:40 EST
Not critical, just need to check
Comment 3 Jerome Lanneluc CLA 2003-03-19 05:29:11 EST
Source attachment root path is not expected to be absolute.
Comment 4 Philipe Mulet CLA 2003-04-11 04:37:09 EDT
Ok to close then.
Comment 5 Jerome Lanneluc CLA 2003-04-11 09:34:03 EDT
Closing