Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336500 - NPE in FeatureBasedDiagnostic#toString
Summary: NPE in FeatureBasedDiagnostic#toString
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-07 07:57 EST by Michael Clay CLA
Modified: 2017-09-19 17:33 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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