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

Bug 319022

Summary: [DI] [UI]EventObjectSupplier doesn't work with wildcards in topic names
Product: z_Archived Reporter: Simon Chemouil <eclipse>
Component: E4Assignee: Project Inbox <e4.runtime-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ob1.eclipse
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix for the EventObjectSupplier
none
Patch none

Description Simon Chemouil CLA 2010-07-06 11:41:34 EDT
Build Identifier: I20100705-2033

The OSGi spec allows to specify wildcards in topic names, ie, for an action group 
my/company/{ACTION1,ACTION2} one can listen on "my/company/*".

When using a wildcard in the topic in the @EventTopic annotation, the event is received but the Supplier can't find it back, and supplies null to the requestor.

The same problem exists with UIEventTopic / UIEventObjectSupplier

Reproducible: Always
Comment 1 Simon Chemouil CLA 2010-07-06 11:43:33 EDT
Created attachment 173572 [details]
Fix for the EventObjectSupplier

This patch fixes the problem by remembering the topic on which the requestor subscribed, rather than finding the full topic name from the received event.
Comment 2 Oleg Besedin CLA 2010-07-06 13:51:35 EDT
Simon, could you attach a patch against CVS Head? The patch seems to be using Git something-or-other.

Also, could you make a JUnit to make sure that the problem stays fixed?
Comment 3 Oleg Besedin CLA 2010-07-06 15:21:24 EDT
Created attachment 173589 [details]
Patch

Patch against CVS Head + JUnit + updated the UIEvent counterpart and its test.
Comment 4 Oleg Besedin CLA 2010-07-06 15:24:11 EDT
Patch applied to CVS Head. Thank Simon for finding this out and providing the fix!
Comment 5 Simon Chemouil CLA 2010-07-06 17:06:45 EDT
(In reply to comment #2)
> Simon, could you attach a patch against CVS Head? The patch seems to be using
> Git something-or-other.
> 
> Also, could you make a JUnit to make sure that the problem stays fixed?

I didn't see this earlier, thanks for applying the patch! (I'll provide my future patches in the appropriate format).