Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352734 - ConditionalComponent does not check the configuration of the "else"-component
Summary: ConditionalComponent does not check the configuration of the "else"-component
Status: RESOLVED FIXED
Alias: None
Product: EMFT
Classification: Modeling
Component: MWE (show other bugs)
Version: 1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: SR2   Edit
Assignee: Karsten Thoms CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 08:44 EDT by Marc Schlienger CLA
Modified: 2020-10-19 08:48 EDT (History)
3 users (show)

See Also:
sebastian.zarnekow: indigo+


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:44:57 EDT
Build Identifier: org.eclipse.emf.mwe.core_1.1.0.v201106070424

Usually a component has the possibility to check its configuration and to perform specific tasks during the call to checkConfiguration. To say it differently, checkConfiguration has side effects, without saying that it is a good thing or a bad thing.

But...

due to the fact that "checkConfiguration()" is not called on the "elseComp" component of ConditionalComponent, some critical initialization might be missing.

I would suggest to override checkConfiguration in ConditionalComponent, with something like this:

	@Override
	public void checkConfiguration(Issues issues) throws ConfigurationException {
		super.checkConfiguration(issues);
		
		// Do not forget to check the config on the elseComp
		if (elseComp != null) {
			elseComp.checkConfiguration(issues);
		}
	}


Reproducible: Always
Comment 1 Sebastian Zarnekow CLA 2011-07-21 10:43:21 EDT
Good catch. Thanks for the report.
Comment 2 Karsten Thoms CLA 2011-08-22 15:53:28 EDT
Fixed and pushed to master.
Comment 3 Christian Dietrich CLA 2020-10-19 08:48:56 EDT
fixed somewhen in 2011