| Summary: | NPE protection required in VirtualComponent | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Java EE Tools | Reporter: | Jason Sholl <jsholl> | ||||
| Component: | jst.j2ee | Assignee: | Jason Sholl <jsholl> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Chuck Bridgham <cbridgha> | ||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | cbridgha, david_williams, raghunathan.srinivasan, stryker | ||||
| Version: | 3.2 | Flags: | david_williams:
pmc_approved+
stryker: pmc_approved? (raghunathan.srinivasan) stryker: pmc_approved? (naci.dai) stryker: pmc_approved? (deboer) stryker: pmc_approved? (neil.hauge) stryker: pmc_approved? (kaloyan) cbridgha: review+ |
||||
| Target Milestone: | 3.2 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | PMC_approved | ||||||
| Attachments: |
|
||||||
|
Description
Jason Sholl
Created attachment 166639 [details]
patch
Here's the NPE this is protecting against:
java.lang.NullPointerException
at org.eclipse.wst.common.componentcore.internal.util.VirtualReferenceUtilities.getDefaultArchiveName(VirtualReferenceUtilities.java:71)
at org.eclipse.wst.common.componentcore.internal.util.VirtualReferenceUtilities.ensureReferencesHaveNames(VirtualReferenceUtilities.java:60)
at org.eclipse.jst.j2ee.componentcore.util.EARVirtualComponent.customizeCreatedReference(EARVirtualComponent.java:97)
at org.eclipse.wst.common.componentcore.internal.resources.VirtualComponent.getReferences(VirtualComponent.java:396)
at org.eclipse.jst.j2ee.componentcore.util.EARVirtualComponent.getHardReferences(EARVirtualComponent.java:86)
at org.eclipse.jst.j2ee.componentcore.util.EARVirtualComponent.getReferences(EARVirtualComponent.java:180)
at org.eclipse.jst.j2ee.project.EarUtilities.getComponentReferencesAsList(EarUtilities.java:129)
at org.eclipse.jst.j2ee.project.EarUtilities.getComponentReferences(EarUtilities.java:113)
at org.eclipse.jst.j2ee.project.EarUtilities.getJ2EEModuleReferences(EarUtilities.java:83)
I've glanced at it, looks good. Chuck? approved After M7 all require PMC approvals Please follow the process outlined on this wiki , http://wiki.eclipse.org/WTP_PMC_Defect_Review#How_To_Prepare_a_PMC_Defect_Candidate * 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.
This is an unexpected NPE which can blow away the stack.
* Is there a work-around? If so, why do you believe the work-around is insufficient?
There is no workaround
* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?
Tested manually since it is merely a simple NPE
* Give a brief technical overview. Who has reviewed this fix?
I have looked it over, and Chuck Bridgha has approved. The technical overview is to avoid the NPE and not call methods if a reference is null.
* What is the risk associated with this fix?
I see miniscule to zero risk with this fix.
code checked into HEAD for RC1 *** Bug 311732 has been marked as a duplicate of this bug. *** |