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

Bug 334556

Summary: Need to restore support fallback to dependentObject in maintenance stream
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 2011-01-17 12:59:25 EST
Build Identifier: 305P

As part of bug 322678 we moved the EarVirtualComponent.getHardReferences method to use archiveName instead of the dependentObject. This is causing the EAR validator to get out of sync when the user imports an older project that does not contain the archiveName set in the .component file.

This patch enhances the previous patch as follows:

1. First try to get the archiveName using referencedComponent.getArchiveName()
2. If step 1 returns null, fall back on old method (referencedComponent.getDependentObject())) to ensure backward toleration
3. If step 2 returns null compute the default archiveName.

Patch attached for review.

Reproducible: Always
Comment 1 Hari Shankar CLA 2011-01-17 12:59:49 EST
Created attachment 186930 [details]
patch

Patch
Comment 2 Chuck Bridgham CLA 2011-01-17 13:07:15 EST
approved
Comment 3 Carl Anderson CLA 2011-01-31 11:38:50 EST
Committed to R3_0_5_patches