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

Bug 352731

Summary: CompositeComponent has no default constructor
Product: [Modeling] EMFT Reporter: Marc Schlienger <marc.schlienger>
Component: MWEAssignee: Karsten Thoms <karsten.thoms>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: karsten.thoms, sebastian.zarnekow
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Marc Schlienger CLA 2011-07-21 08:35:54 EDT
Build Identifier: org.eclipse.emf.mwe.core_1.1.0.v201106070424

Due to a missing default constructor, when using a CompositeComponent directly from within the workflow, it fails with a class instanciation error.

In the class VisitorCreator, which is responsible for parsing the workflow and creating the right components, fails on line 135 with the call:
bean = toLoad.newInstance();


Reproducible: Always
Comment 1 Karsten Thoms CLA 2011-08-22 15:48:42 EDT
I think the CompositeComponent should rather be abstract. I don't think it makes sense to use it in a workflow without subclassing it. What do you think? What is your use case to use it directly?
Comment 2 Sebastian Zarnekow CLA 2011-08-22 17:45:21 EDT
The CompositeComponent should serve as a sequential container for other components, e.g. it could be used as the elseComponent of a conditional component. IMO it should not be marked as abstract.
Comment 3 Marc Schlienger CLA 2011-08-23 14:57:59 EDT
yes, I agree with Sebastian. This is actually the case, CompositeComponent has a constructor with one argument (String) and it breaks when used in a ConditionalComponent having an "else" component due to reflection instanciating the class with default constructor.