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

Bug 356071

Summary: [Xtend] Incomplete return statement
Product: [Modeling] TMF Reporter: Serano Colameo <serano.colameo>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sebastian.zarnekow, sven.efftinge
Version: 2.0.1Flags: sven.efftinge: indigo+
Target Milestone: SR2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Serano Colameo CLA 2011-08-29 09:06:39 EDT
Build Identifier: Xtext 2.0.1

Xtend2:
	def dispatch EObject getField(Iterable<EObject> features, String fName) {
==>		if (!features.nullOrEmpty) return
		val fields = getFeatures(features.filter(typeof(Attribute)).filter(typeof(EObject)), fName)
		if (!fields.nullOrEmpty) return fields.head
		val map = getMap(features.filter(typeof(Mapping)), fName)
		if (map != null) map.type
	}


Java:
 protected EObject _getField(final Iterable<EObject> features, final String fName) {
    EObject _xblockexpression = null;
    {
      boolean _isNullOrEmpty = IterableExtensions.isNullOrEmpty(features);
      boolean _operator_not = BooleanExtensions.operator_not(_isNullOrEmpty);
      if (_operator_not) {
bug ==>        return; 
      }
      Iterable<Attribute> _filter = IterableExtensions.<Attribute>filter(features, com.csg.cs.tools.mdgen.icm.icmDsl.Attribute.class);



Reproducible: Always

Steps to Reproduce:
1.see details
2.
3.
Comment 1 Sebastian Zarnekow CLA 2011-09-28 11:46:08 EDT
A validation rule is missing here.
Comment 2 Sven Efftinge CLA 2011-10-12 11:11:28 EDT
pushed to master
Comment 3 Karsten Thoms CLA 2017-09-19 17:03:49 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:15:36 EDT
Closing all bugs that were set to RESOLVED before Neon.0