Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349874

Summary: IRs are being cached in two places
Product: z_Archived Reporter: Justin Spadea <jspadea>
Component: EDTAssignee: Justin Spadea <jspadea>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Justin Spadea CLA 2011-06-20 17:12:55 EDT
There are places that call IEnvironment.save() with the serialize flag set to false, meaning "cache the IR but don't write to disk". Unfortunately with the current API this propagates to another save() method with the boolean flag gone, and in its place is an IObjectStore. If the store is null, then we just cache it, otherwise we write to disk using the store.

The problem is that the builder has object stores that hold onto their own caches. We need the store so that we can tell it to cache the part. Otherwise it gets cached in the map from AbstractEnvironment. However we don't want the store to write it to disk. One thought is maybe we could use the key to locate the appropriate store - and if no stores "own" that part, then it would fall back on super's implementation.
Comment 1 Justin Spadea CLA 2011-08-23 12:53:44 EDT
Fixed the following files:

IFileSystemObjectStore.java
ProjectBuildPathEntry.java
ProjectIREnvironment.java
AbstractEnvironment.java
CachingObjectStore.java
ZipFileObjectStore.java
Comment 2 Justin Spadea CLA 2011-09-08 14:36:17 EDT
Verified