Bug 116072 - cached classpath containers not removed when project deleted
Summary: cached classpath containers not removed when project deleted
Status: VERIFIED FIXED
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 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-11 15:47 EST by Ernest Pasour CLA
Modified: 2006-03-27 10:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.)