Bug 116072

Summary: cached classpath containers not removed when project deleted
Product: [Eclipse Project] JDT Reporter: Ernest Pasour <Ernest.Pasour>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ernest Pasour CLA 2005-11-11 15:47:03 EST
The problem occurs if I 
1. create a project
2. delete the project (delete contents)
3. create the project again (i.e. with the same name)
*Must all be during the same session.

I am creating my own nature which adds my own classpath container while creating
 a Java Project.  I find that the
JavaModelManager.getJavaModelManager().containerGet() code accesses a cache that
was not cleared during the project delete.  containerGet() is called under the
covers during the 2nd project creation and the previous instance of the
classpath container is returned.  What I expect to happen is for a new instance
of my classpath container to be created whenever a project is created.
Comment 1 Jerome Lanneluc CLA 2006-02-28 08:55:49 EST
Now removing all containers for a project at the same time we remove the PerProjectInfo.

Added regression test ClasspathInitializerTest#testContainerInitializer12()
Comment 2 Maxime Daniel CLA 2006-03-27 10:40:07 EST
Verified for 3.2M6 using build I20060327-0010.
(Checked the new test case and did a manual check against user libraries.)