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

Bug 334440

Summary: ImpliedElementProperty causes NPE if it doesn't have a XmlBinding
Product: z_Archived Reporter: Shenxue Zhou <shenxue.zhou>
Component: SapphireAssignee: Shenxue Zhou <shenxue.zhou>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: konstantin, raj.alagumalai
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch to fix the NPE konstantin: iplog+

Description Shenxue Zhou CLA 2011-01-14 17:40:20 EST
Build Identifier:  M20100909-0800

For ImpliedElementProperty, it there is no @XmlBinding specified, it'd result NPE. Here is the partial stack trace:

ava.lang.NullPointerException
	at org.eclipse.sapphire.modeling.xml.XmlElement.getChildNode(XmlElement.java:695)
	at org.eclipse.sapphire.modeling.xml.VirtualChildXmlResource.getXmlElement(VirtualChildXmlResource.java:41)
	at org.eclipse.sapphire.modeling.xml.XmlValueBindingImpl.xml(XmlValueBindingImpl.java:51)
	at org.eclipse.sapphire.modeling.xml.StandardXmlValueBindingImpl.read(StandardXmlValueBindingImpl.java:110)
	at oracle.eclipse.tools.weblogic.descriptors.jdbc.internal.JdbcTransactionParameters.refreshProperty(JdbcTransactionParameters.java:843)
	at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:385)
	at org.eclipse.sapphire.modeling.ModelElement.refresh(ModelElement.java:378)
	at oracle.eclipse.tools.weblogic.descriptors.jdbc.internal.JdbcTransactionParameters.getDebugLevel(JdbcTransactionParameters.java:57)
	at oracle.eclipse.tools.weblogic.descriptors.jdbc.internal.JdbcTransactionParameters.read(JdbcTransactionParameters.java:1386)
	at org.eclipse.sapphire.modeling.ModelElement.read(ModelElement.java:161)
	at org.eclipse.sapphire.modeling.ModelElement.refreshValidationResult(ModelElement.java:521)
	at org.eclipse.sapphire.modeling.ModelElement.validate(ModelElement.java:503)
	at org.eclipse.sapphire.modeling.ModelElementHandle.refreshValidationState(ModelElementHandle.java:258)
	at org.eclipse.sapphire.modeling.ModelElementHandle.refreshInternal(ModelElementHandle.java:224)
	at org.eclipse.sapphire.modeling.ModelElementHandle.init(ModelElementHandle.java:42)

Reproducible: Always
Comment 1 Shenxue Zhou CLA 2011-01-14 17:43:26 EST
Created attachment 186858 [details]
Patch to fix the NPE

The patch ensures an XmlPath is always creates for an element of ImpliedElementProperty even if there is no @XmlBinding.
Comment 2 Konstantin Komissarchik CLA 2011-01-18 19:18:29 EST
Fix committed.
Comment 3 Raj Alagumalai CLA 2011-02-25 13:00:55 EST
verified with build 161 using IContact.java
Comment 4 Shenxue Zhou CLA 2011-02-25 13:06:37 EST
Raj has verified it.