Community
Participate
Working Groups
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.
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);
Not critical, just need to check
Source attachment root path is not expected to be absolute.
Ok to close then.
Closing