Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361457 - Xtend: NPE when creating a UML EnumerationLiteral
Summary: Xtend: NPE when creating a UML EnumerationLiteral
Status: CLOSED FIXED
Alias: None
Product: M2T
Classification: Modeling
Component: Xpand (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 15:02 EDT by Tatiana Fesenko CLA
Modified: 2013-02-21 08:10 EST (History)
2 users (show)

See Also:
karsten.thoms: juno+


Attachments
Proposed patch (1.15 KB, patch)
2011-10-19 15:15 EDT, Tatiana Fesenko CLA
sven.efftinge: iplog+
Details | Diff
Reproducing Xpand Project (24.68 KB, application/binary)
2011-10-20 03:28 EDT, Karsten Thoms CLA
no flags Details
Reproducing Xpand Project (24.83 KB, application/binary)
2011-10-20 03:46 EDT, Karsten Thoms CLA
no flags Details

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