Bug 305122

Summary: FUP of 302949
Product: [Eclipse Project] JDT Reporter: Satyam Kandula <satyam.kandula>
Component: CoreAssignee: Jay Arthanareeswaran <jarthana>
Status: VERIFIED FIXED QA Contact:
Severity: trivial    
Priority: P3 CC: amj87.iitr, Olivier_Thomann
Version: 3.6   
Target Milestone: 3.6 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Patch none

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.