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

Bug 361457

Summary: Xtend: NPE when creating a UML EnumerationLiteral
Product: [Modeling] M2T Reporter: Tatiana Fesenko <tatiana.fesenko>
Component: XpandAssignee: Project Inbox <m2t.xpand-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: karsten.thoms, sven.efftinge
Version: 1.1.0Flags: karsten.thoms: juno+
Target Milestone: M3   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Proposed patch
sven.efftinge: iplog+
Reproducing Xpand Project
none
Reproducing Xpand Project none

Description Tatiana Fesenko CLA 2011-10-19 15:02:38 EDT
Create a simple XTend transformation creating EnumerationLiteral, e.g.

let literal = new uml::EnumerationLiteral:
	literal.setName(el.name)->
literal

NPE will be thrown:
java.lang.NullPointerException
	at org.eclipse.xtend.typesystem.uml2.profile.ProfileMetaModel.getFullName(ProfileMetaModel.java:222)
	at org.eclipse.xtend.typesystem.uml2.profile.ProfileMetaModel.getType(ProfileMetaModel.java:255)
	at org.eclipse.xtend.expression.TypeSystemImpl$1.createNew(TypeSystemImpl.java:149)
Comment 1 Tatiana Fesenko CLA 2011-10-19 15:15:23 EDT
Created attachment 205562 [details]
Proposed patch
Comment 2 Karsten Thoms CLA 2011-10-20 03:28:31 EDT
Created attachment 205581 [details]
Reproducing Xpand Project
Comment 3 Karsten Thoms CLA 2011-10-20 03:46:17 EDT
Created attachment 205583 [details]
Reproducing Xpand Project

revised project
Comment 4 Karsten Thoms CLA 2011-10-20 03:47:27 EDT
Thanks for the patch! Could reproduce the issue and solution.
Comment 5 Karsten Thoms CLA 2013-02-21 08:10:19 EST
Bug resolved before Xpand 1.2 release date => Closing