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

Bug 322678

Summary: In EARVirtualComponent.getHardReferences, need to get the archiveName directly from the referencedComponent, instead of getting it from the dependentObject
Product: [WebTools] WTP Java EE Tools Reporter: Hari Shankar <hshanka>
Component: jst.j2eeAssignee: Hari Shankar <hshanka>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc
Version: unspecifiedFlags: cbridgha: review+
Target Milestone: 3.0.5 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch ccc: iplog+

Description Hari Shankar CLA 2010-08-13 13:28:22 EDT
Build Identifier: 305p

The EARVirtualComponent uses the dependentObject on a ReferencedComponent in order to get to the URI. We need to move away from this, since the dependentComponent is often stale if the uri changes.

Reproducible: Always
Comment 1 Hari Shankar CLA 2010-08-13 13:29:12 EDT
Created attachment 176572 [details]
patch

This patch removes the use of dependentObject, and directly gets the archive name from the referencedcomponent. If the archive name is not found, we follow the currently existing default name logic.
Comment 2 Hari Shankar CLA 2010-08-16 10:51:06 EDT
Some more additional information on this patch:

The getHardReferences() method only returns an arraylist of IVirtualReference objects, hence it is not concerned with matching the specific reference from the component file with the corresponding entry in the module.

Getting the archiveName from the dependentObject resulted in getting back stale values (we have seen this issue in other places as well), hence the decision not to get the archiveName from the dependentObject.

I realize that the earlier title conveyed a scope much larger and unintended to be covered by this defect, hence changed the title as well.

Requesting review of the patch.
Comment 3 Chuck Bridgham CLA 2010-08-18 13:24:54 EDT
approved
Comment 4 Carl Anderson CLA 2010-08-30 17:46:34 EDT
Committed to R3_0_5_patches