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

Bug 370118

Summary: findCodeTypeById on CodeService and CodeServiceClientProxy works for cached code types only
Product: z_Archived Reporter: Andi Bur <andi.bur>
Component: ScoutAssignee: Project Inbox <scout.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Andi Bur CLA 2012-01-30 07:43:56 EST
CodeService.findCodeTypeById as well as CodeServiceClientProxy.findCodeTypeById works on cached data. The cache is populated incrementally, whenever a new ICodeType class is created. Hence it is not guaranteed that a code type is already part of the cache at the time the findCodeTypeById method is invoked.

Proposed solution:
As a side effect, the cache is populated by calling getAllCodeTypes. Hence the findCodeTypeById should first consult the cache. If the code type has been found, we are done. Otherwise the cache is populated by invoking getAllCodeTypes and the code type is searched again. This approach also copes with different languages and partitions (code type caches exist per <language, partition> pair).
Comment 1 Andi Bur CLA 2012-01-30 12:13:12 EST
implemented as proposed.
Comment 2 Andi Bur CLA 2012-01-30 12:13:36 EST
resolved as fixed...
Comment 3 Matthias Zimmermann CLA 2012-07-09 06:49:42 EDT
ticket closed.
deliverd as part of eclipse scout 3.8.0 (juno release train)