Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 261278 - IUPropertyUtils should not short circuit the collector
Summary: IUPropertyUtils should not short circuit the collector
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M5   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-15 16:57 EST by Ian Bull CLA
Modified: 2009-01-20 21:24 EST (History)
4 users (show)

See Also:


Attachments
Test case (6.31 KB, patch)
2009-01-15 16:57 EST, Ian Bull CLA
no flags Details | Diff
Updated test (fixed a typo) (6.30 KB, patch)
2009-01-15 16:59 EST, Ian Bull CLA
jeffmcaffer: iplog+
Details | Diff
IUPropertyUtils fix (995 bytes, patch)
2009-01-15 17:01 EST, Ian Bull CLA
jeffmcaffer: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2009-01-15 16:57:49 EST
Created attachment 122738 [details]
Test case

The two collectors used for finding locales in IUPropertyUtils short circuit if they don't find the item on the first try.  

For example, if you have 3 fragments that provide locales {A,B,C} and the one you want is in C, the current collector will check A, and simply short circuit if this is not the answer.  The accept should return true if the item has not been found yet (remember, the return value of accept means: continue running the query).

I have created a test case that demonstrates this problem.
Comment 1 Ian Bull CLA 2009-01-15 16:59:37 EST
Created attachment 122739 [details]
Updated test (fixed a typo)
Comment 2 Ian Bull CLA 2009-01-15 17:01:47 EST
Created attachment 122740 [details]
IUPropertyUtils fix

This patch fixes the bug.
Comment 3 Dave Stevenson CLA 2009-01-16 11:53:03 EST
The patch looks like the right fix for the problem (obviously). My testing apparently didn't cover multiple localization fragments for a single iu.
Comment 4 Jeff McAffer CLA 2009-01-20 11:33:34 EST
is this waiting on anything else before it can be committed?
Comment 5 Ian Bull CLA 2009-01-20 11:55:27 EST
(In reply to comment #4)
> is this waiting on anything else before it can be committed?
> 

I think this is ready to go in (along with the test cases).
Comment 6 Dave Stevenson CLA 2009-01-20 12:05:10 EST
The fix should go in.
Comment 7 Pascal Rapicault CLA 2009-01-20 12:17:11 EST
Patch released in HEAD.