Bug 352731 - CompositeComponent has no default constructor
Summary: CompositeComponent has no default constructor
Status: ASSIGNED
Alias: None
Product: EMFT
Classification: Modeling
Component: MWE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Karsten Thoms CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 08:35 EDT by Marc Schlienger CLA
Modified: 2011-08-23 14:57 EDT (History)
2 users (show)

See Also:


Attachments

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