Bug 305122 - FUP of 302949
Summary: FUP of 302949
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 trivial (vote)
Target Milestone: 3.6 M7   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-09 04:52 EST by Satyam Kandula CLA
Modified: 2010-04-26 13:26 EDT (History)
2 users (show)

See Also:


Attachments
Proposed Patch (5.55 KB, patch)
2010-03-23 13:05 EDT, Jay Arthanareeswaran CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Satyam Kandula CLA 2010-03-09 04:52:00 EST
Build Identifier: I20100305-1011

This bug is to track the following issues. 
1. Investigate if JavaModelManager#getNonChainingJarsCache() should store the nonChainingJars in the instance variable. 
2. In JavaModelManager#getNonChainingJarsCache(), Collections.synchronizedSet() could be used at the end of the function before returning! This will avoid some unnecessary synchronization of the local hashset. 

Reproducible: Didn't try
Comment 1 Jay Arthanareeswaran CLA 2010-03-23 13:05:15 EDT
Created attachment 162789 [details]
Proposed Patch

Patch with tests

Satyam, can you review this, please?
One note about the change to JavaModelManager#getNonChainingJarsCache:
The check to return the existing this.nonChainingJars ensures that non chaining jars cache is computed again only right after a reset. Even if there is one entry we save the cache as is.
Comment 2 Satyam Kandula CLA 2010-03-24 04:51:42 EDT
Jay,
Things does not look good if they are two projects. The second project is overwriting the nonchained jars for the first one. Can you look at that?
Comment 3 Satyam Kandula CLA 2010-03-26 05:10:55 EDT
+1 for the proposed patch. 
Though the attached test fails if expanded to two projects, it should not impact the correctness.
Comment 4 Jay Arthanareeswaran CLA 2010-03-29 01:37:57 EDT
Released in HEAD for 3.6M7.
Comment 5 Ayushman Jain CLA 2010-04-26 08:37:32 EDT
Verified for 3.6M7 through code inspection
Comment 6 Jay Arthanareeswaran CLA 2010-04-26 13:26:32 EDT
Verified.