[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Possible bug in ServiceTracker

Good eyesight. I guess I need to get my eyes checked. :-) That extra space 
would do it.

The filter processor takes all characters from the operator to the close 
parenthesis as the value. Such spaces may be part of the value being 
matched and the filter processor does not know whether spaces can be 
safely trimmed or not.

I suppose a filter processor implementation could special case objectClass 
since it is a specified and well known attribute and it knows that class 
names may not contain spaces...

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave@xxxxxxxxxx
Office: +1 407 849 9117 Mobile: +1 386 848 3788



Thomas Watson/Austin/IBM@IBMUS 
Sent by: equinox-dev-bounces@xxxxxxxxxxx
2006-05-22 11:22 AM
Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
cc

Subject
Re: [equinox-dev] Possible bug in ServiceTracker







It looks like you have an extra space in you filter string before the last 
')' 

String filterString = "(" + Constants.OBJECTCLASS + "=" + 
Content.class.getName() + " )";

We do not trim the trailing spaces on the string when doing string 
matching.  It may be nice to trim the trailing spaces but I'm not sure if 
that is allowed by the spec. 

Tom



Niclas Hedhman <niclas@xxxxxxxxxxx> 
Sent by: equinox-dev-bounces@xxxxxxxxxxx 
05/22/2006 09:45 AM 

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To
Equinox development mailing list <equinox-dev@xxxxxxxxxxx> 
cc

Subject
Re: [equinox-dev] Possible bug in ServiceTracker








On Monday 22 May 2006 21:57, BJ Hargrave wrote:
> I am not sure what is happening for you.
>
> I wrote the following code:
<snip/>
> which worked fine for me:

Yeah, I kind of expected that.... Have a hard time understanding it could 
have 
passed this far otherwise.

My code (verbatimly tried) can be seen on; 
http://rafb.net/paste/results/vUw1zc99.html

Not working --> http://rafb.net/paste/results/k2ONjs73.html
Working --> http://rafb.net/paste/results/4o6fYu32.html


If I comment out the Filter block, and replace with the String filter, it 
works.


I will also try to test against some other OSGi container to see if it is 
Equinox specific or not.


Cheers
Niclas
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev