Bug 100528 - Illegal argument exception when changing class path variable value from c:\tmp ==> c:\temp
Summary: Illegal argument exception when changing class path variable value from c:\tm...
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-17 03:48 EDT by Dirk Baeumer CLA
Modified: 2007-06-19 15:58 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 Dirk Baeumer CLA 2005-06-17 03:48:46 EDT
RC2

- create a class path variable MyFolder point to c:\tmp
  (Preferences->Java->Build Path->Class path variables)
- add the class path variable to a project X, don't extend the variable
- go the the class path variable dialog again
- change the value of MyFolder to c:\temp

Observe: you get the following exception. 

Everything works correctly if the depth of the path > 1 (e.g for a folder c:\a\b)

java.lang.IllegalArgumentException: Path must include project and resource name:
/tmp
	at org.eclipse.core.internal.utils.Assert.isLegal(Assert.java:60)
	at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:1554)
	at org.eclipse.core.internal.resources.Container.getFolder(Container.java:139)
	at
org.eclipse.jdt.internal.core.JavaProject.getPackageFragmentRoot(JavaProject.java:1653)
	at
org.eclipse.jdt.internal.core.JavaProject.computePackageFragmentRoots(JavaProject.java:535)
	at
org.eclipse.jdt.internal.core.SetClasspathOperation.generateClasspathChangeDeltas(SetClasspathOperation.java:363)
	at
org.eclipse.jdt.internal.core.SetClasspathOperation.updateClasspath(SetClasspathOperation.java:648)
	at
org.eclipse.jdt.internal.core.SetClasspathOperation.executeOperation(SetClasspathOperation.java:266)
	at
org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:718)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719)
	at
org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:782)
	at org.eclipse.jdt.internal.core.JavaProject.setRawClasspath(JavaProject.java:2834)
	at
org.eclipse.jdt.internal.core.JavaModelManager$11.run(JavaModelManager.java:2699)
	at
org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
	at
org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:718)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1719)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3760)
	at
org.eclipse.jdt.internal.core.JavaModelManager.updateVariableValues(JavaModelManager.java:2680)
	at org.eclipse.jdt.core.JavaCore.setClasspathVariables(JavaCore.java:4069)
	at
org.eclipse.jdt.internal.ui.wizards.buildpaths.VariableBlock$VariableBlockRunnable.setVariables(VariableBlock.java:403)
	at
org.eclipse.jdt.internal.ui.wizards.buildpaths.VariableBlock$2.run(VariableBlock.java:305)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
Comment 1 David Audel CLA 2005-06-17 06:06:19 EDT
Same problem in 3.0.2 but not in 3.0
Comment 2 Frederic Fusier CLA 2007-06-19 09:47:07 EDT
Cannot reproduce using 3.2.2