Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345963 - Critical UI NPE for CONSUMES types references
Summary: Critical UI NPE for CONSUMES types references
Status: RESOLVED DUPLICATE of bug 345961
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: 3.2.4   Edit
Hardware: PC Linux
: P1 major (vote)
Target Milestone: 3.3.2   Edit
Assignee: Rob Stryker CLA
QA Contact: Carl Anderson CLA
URL:
Whiteboard:
Keywords:
Depends on: 345961
Blocks:
  Show dependency tree
 
Reported: 2011-05-16 10:59 EDT by Rob Stryker CLA
Modified: 2011-10-25 10:31 EDT (History)
0 users

See Also:
ccc: review+


Attachments
Patch to ignore archiveName in CONSUMED references (1.56 KB, patch)
2011-05-16 11:09 EDT, Rob Stryker CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Stryker CLA 2011-05-16 10:59:21 EDT
+++ This bug was initially created as a clone of Bug #345961 +++

An NPE is generated when modifying the "Deploy Path" of a CONSUMED reference in the Module Assembly Property Page. The NPE is caused by attempting to append the archiveName attribute of the virtual reference to it's runtime Path. 

The reason this causes an error is because CONSUMED type references are not required, and cannot be guaranteed to have, an archive name. Archive names are ignored for CONSUMED type references, and only the runtime path is used.

The fix is to ignore archive name on consumed references in this part of the code. This is a regression, though I have not yet had the time to identify how far back it was caused. It seems to have been introduced when optimized viewer updates were added rather than refreshing the entire view after a modify. 

This is a critical fix for an adopter (wtp-m2e integration).
Comment 1 Rob Stryker CLA 2011-05-16 11:06:31 EDT
Targeting. I'm not sure if 3.2.5 needs PMC, but I figure, I might as well fill out the PMC flags anyway ;) 

    * Explain why you believe this is a stop-ship defect. Or, if it is a
"hotbug" (requested by an adopter) please document it as such. 

   An adopter (wtp-m2e integration) has been trying to add reference types of
their own design, and this bug prevents modification of the deploy path
attribute in the UI. 

    * Is there a work-around? If so, why do you believe the work-around is
insufficient? 

   A workaround is for the user to use the raw text facility to modify the
component xml file at all times. This is not suitable for most cases. 

    * How has the fix been tested? Is there a test case attached to the
bugzilla record? Has a JUnit Test been added? 

   The fix has been manually tested by myself. There is no junit test for the
UI. 

    * Give a brief technical overview. Who has reviewed this fix? 

   If the reference is a CONSUMED type reference, the archiveName is no longer
appended to the runtimePath, as per the unwritten-but-understood spec and
expected behavior. 

    * What is the risk associated with this fix? 

   The risk of this bug is extremely isolated and small. I consider this a very
very safe patch.
Comment 2 Rob Stryker CLA 2011-05-16 11:09:57 EDT
Created attachment 195740 [details]
Patch to ignore archiveName in CONSUMED references
Comment 3 Carl Anderson CLA 2011-05-17 00:02:16 EDT
Rob, 3.2.5 does not need PMC.  However, please wait until 3.2.5 development begins before committing this change- we are still trying to wrap up 3.2.4.
Comment 4 Carl Anderson CLA 2011-10-13 13:50:19 EDT
Rob,

   3.2.5 needs PMC now.  Can this be deferred?
Comment 5 Rob Stryker CLA 2011-10-20 06:32:58 EDT
Hi Carl:

I really do think this was a critical fix that needed to get in, however our team is not really targeting 3.2.5 for product. I suppose that means it can be deferred.
Comment 6 Carl Anderson CLA 2011-10-20 14:14:45 EDT
Rob, the sooner this is committed, the better.  Retargeting to WTP 3.3.2
Comment 7 Rob Stryker CLA 2011-10-25 10:31:02 EDT
Since this issue was a backport of something in 3.3 RC1, retargeting it to a 3.3.x maintenance release is effectively rendering this bugzilla entry a duplicate of the entry it was cloned from. 

This bug is now being closed as a duplicate.

*** This bug has been marked as a duplicate of bug 345961 ***