Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] EventAdmin and topic legality

Line 187 in Event.java indicates that the token is the empty string. This 
implies that you have 2 (or more) adjacent slashes in the topic name: e.g. 
foo//bar.

What leads you to believe the Equinox EventAdmin impl is more strict in 
the token grammar? The test for valid token is in 
or.osgi.service.event.Event which is from OSGi.

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave@xxxxxxxxxx

office: +1 386 848 3788
mobile: +1 386 848 3788




"Michael Furtak" <mfurtak@xxxxxxx> 
Sent by: equinox-dev-bounces@xxxxxxxxxxx
01/30/2007 09:26 AM
Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


To
<equinox-dev@xxxxxxxxxxx>
cc

Subject
[equinox-dev] EventAdmin and topic legality






Good morning.
 
Forgive my posting if this is not the right forum to be asking these 
questions.  If so, redirection would be appreciated.
 
I’m having a spot of trouble with the Equinox EventAdmin.  It seems like 
the Equinox EventAdmin will not accept a topic that contains certain 
tokens, producing:
 
Exception in thread "Thread-0" java.lang.IllegalArgumentException: invalid 
topic
        at org.osgi.service.event.Event.validateToken(Event.java:187)
        at org.osgi.service.event.Event.validateTopicName(Event.java:161)
        at org.osgi.service.event.Event.<init>(Event.java:46)
        …
 
The core OSGi spec defines a token as one or more alphanumerics, 
underscores, or dashes (1.4.2 - General Syntax Definitions).  Based on my 
investigation, the Equinox implementation seems to have a more strict 
interpretation of what is a valid token.  Dashes seem to be completely 
disallowed.  Numbers and underscores can be present, but cannot be the 
first character in a token.  Overall this seems similar to Java variable 
naming rules, but I was curious whether my interpretation of the spec is 
incorrect or if there was a reason for the discrepancy.
 
Many thanks,
-Mike Furtak_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top