| Summary: | Prevent PluginModelManager from being instantiated | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Curtis Windatt <curtis.windatt.public> | ||||||||
| Component: | UI | Assignee: | Ankur Sharma <ankur_sharma> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P2 | CC: | ankur_sharma, darin.eclipse | ||||||||
| Version: | 3.6 | ||||||||||
| Target Milestone: | 3.7 M2 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Curtis Windatt
Created attachment 171259 [details]
Patch
Fixed in HEAD Looking at the code, there is some clean up that we should do here. The #getInstance() method on PluginModelManager should be synchronized to avoid having 2 instances created from different threads in a race condition. As well, since the singleton is cahced in the PluginModelManager class, PDECore should not keep a reference to the singleton either...(i.e. in fModelManager). It should always delegate to the #getInstance() method. In fact, none of the singleton objects in PDECore are created synch blocks, and this should be investigated (i.e. fModelManager, fTargetProfileManager, fFeatureModelManager...). Created attachment 176544 [details]
Additional patch
Added synchronized and cleaned up PDECore
Created attachment 176579 [details]
patch
Added synchronization on creation of other singletons in PDE Core.
Applied/Fixed. |