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

Bug 336500

Summary: NPE in FeatureBasedDiagnostic#toString
Product: [Modeling] TMF Reporter: Michael Clay <clay>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow
Version: 2.0.0Flags: sebastian.zarnekow: indigo+
Target Milestone: M6   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Michael Clay CLA 2011-02-07 07:57:49 EST
cause: eStructuralFeature index not applicable to sourceObject

stacktrace: java.lang.NullPointerException
       at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSettingDelegate(BasicEObjectImpl.java:1542)
       at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1029)
       at org.eclipse.xtext.impl.AbstractMetamodelDeclarationImpl.eGet(AbstractMetamodelDeclarationImpl.java:158)
       at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1013)
       at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1005)
       at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1000)
       at org.eclipse.xtext.validation.FeatureBasedDiagnostic.toString(FeatureBasedDiagnostic.java:83)
       at java.lang.String.valueOf(String.java:2826)
       at org.eclipse.emf.common.util.AbstractEList.toString(AbstractEList.java:636)
       at java.util.Collections$UnmodifiableCollection.toString(Collections.java:1003)
       at org.eclipse.xtext.xtext.XtextValidationTest.testBug322875_01(XtextValidationTest.java:90)
Comment 1 Sebastian Zarnekow CLA 2011-02-07 08:06:20 EST
Could you please double check whether your sourceEObject's EClass corresponds to the given EStructuralFeature?
Comment 2 Sebastian Zarnekow CLA 2011-02-07 10:13:21 EST
Pushed fix to master.
Comment 3 Karsten Thoms CLA 2017-09-19 17:22:00 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:33:23 EDT
Closing all bugs that were set to RESOLVED before Neon.0