Bug 35272 - Inconsistent validation of CP entries
Summary: Inconsistent validation of CP entries
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-19 04:41 EST by Philipe Mulet CLA
Modified: 2003-06-02 06:13 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 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