Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370118 - findCodeTypeById on CodeService and CodeServiceClientProxy works for cached code types only
Summary: findCodeTypeById on CodeService and CodeServiceClientProxy works for cached c...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-30 07:43 EST by Andi Bur CLA
Modified: 2021-08-19 11:26 EDT (History)
0 users

See Also:


Attachments

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