Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 231019 - ServiceModelManager does not properly register added configurations
Summary: ServiceModelManager does not properly register added configurations
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RDT (show other bugs)
Version: 2.1M2   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 2.1   Edit
Assignee: Chris Recoskie CLA
QA Contact: Greg Watson CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-07 20:26 EDT by Chris Recoskie CLA
Modified: 2011-05-14 06:33 EDT (History)
0 users

See Also:


Attachments
proposed patch (1.15 KB, patch)
2008-05-07 20:26 EDT, Chris Recoskie CLA
g.watson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Recoskie CLA 2008-05-07 20:26:12 EDT
In addConfiguration, there is the following code:

Set<IServiceConfiguration> confs = projectConfigurations.get(project);
		if (confs != null) {
			confs.add(conf);
		}
		
This means that set of configurations never gets created, because there is no corresponding case for when the set of configurations is null.

Also, the configuration needs to be registered in configurations map which stores a mapping of all configurations by name.

In addition, the first configuration added is supposed to be set to be the active configuration (as per javadocs).

The attached patch remedies all this.
Comment 1 Chris Recoskie CLA 2008-05-07 20:26:39 EDT
Created attachment 99210 [details]
proposed patch
Comment 2 Greg Watson CLA 2008-05-08 14:28:58 EDT
Yup, that'll do it.