Community
Participate
Working Groups
The VirtualComponent needs to protect against NPEs by only customizing references that are correct. This appears to be the result of a simple coding error (failing to include this line within the above null check). This is causing adopter product failures due to NPEs.
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. ***