Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327649 - List with null values is evaluated to inner type Void
Summary: List with null values is evaluated to inner type Void
Status: CLOSED DUPLICATE of bug 386253
Alias: None
Product: M2T
Classification: Modeling
Component: Xpand (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-13 07:44 EDT by Steffen Stundzig CLA
Modified: 2017-10-31 10:59 EDT (History)
1 user (show)

See Also:
karsten.thoms: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Stundzig CLA 2010-10-13 07:44:24 EDT
If i've traverse a collection with elements and access a property which returns null, the next calls to the elements in this list breaks the workflow.

For example:

MyListProperty.ThePropertyWhichIsNullForAllElementsInTheList.shortName;

causes a:

AbstractExpressionsUsingWorkflowComponent - Error in Component  of type org.eclipse.xpand2.Generator: 
	EvaluationException : Couldn't find property 'shortName' for inner type Void'

As workaround I can use:

MyListProperty.ThePropertyWhichIsNullForAllElementsInTheList.collect(e|e.shortName);

which returns the List with null-Elements. But this should be the default behaviour also in short Syntax as in the example above.
Comment 1 Karsten Thoms CLA 2012-10-31 07:35:35 EDT
Fixed with bug#386253

Added test case EvaluationTest#testFeatureCallReturningNull()

*** This bug has been marked as a duplicate of bug 386253 ***
Comment 2 Karsten Thoms CLA 2013-02-07 06:16:13 EST
Part of Kepler M4 (Version 1.3.0)
Comment 3 Eclipse Webmaster CLA 2017-10-31 10:48:41 EDT
Requested via bug 522520.

-M.
Comment 4 Eclipse Webmaster CLA 2017-10-31 10:59:43 EDT
Requested via bug 522520.

-M.