As Tom pointed out, the permission classes are case-insensitive when parsing action strings.
https://github.com/osgi/osgi/blob/d38340f72c4770b601d6b7fe04dd60954c636735/org.osgi.service.event/src/org/osgi/service/event/TopicPermission.java#L185-L207
The lowercase action strings are the canonical names but any case is accepted as this is the general convention for Java permission action strings.
--
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and OSGi Specification Project lead // mobile: +1 386 848 3788
hargrave@xxxxxxxxxx
From:
osgi-technology-dev <osgi-technology-dev-bounces@xxxxxxxxxxx> on behalf of Dr. James J. Hunt <jjh@xxxxxxxxx>
Date: Monday, March 27, 2023 at 11:30
To: osgi-technology-dev@xxxxxxxxxxx <osgi-technology-dev@xxxxxxxxxxx>
Subject: [EXTERNAL] Re: [osgi-technology-dev] EventAdmin
Dear BJ, I missed the definition of SUBSCRIBE. If find it a tad misleading to use uppercase for strings that should be lowercase, but that is neither here nor there.
Does that mean that only lowercase "subscribe" but not "SUBSCRIBE"
This Message Is From an Untrusted Sender
|
You have not previously corresponded with this sender.
|
|
|
Dear BJ,
I missed the definition of SUBSCRIBE. If find it a tad misleading to use uppercase for strings that should be lowercase, but that is neither here nor there.
Does that mean that only lowercase "subscribe" but not "SUBSCRIBE" should be accepted, or are these string in fact case independent?
Sincerely,
James
On 3/27/23 17:22, BJ Hargrave wrote:
Lowercase “subscribe” is correct. The spec text should be a hyperlink to
https://docs.osgi.org/specification/osgi.cmpn/8.1.0/service.event.html#org.osgi.service.event.TopicPermission.SUBSCRIBE. I think in many of the specs, the style has been to use uppercase names in the spec text to make it stand out from the surrounding text
as well as to reference the constant names in the permission classes.
--
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and OSGi Specification Project lead // mobile: +1 386 848 3788
hargrave@xxxxxxxxxx
Dear Colleagues, It seems to me that the published org. osgi. service. event. TopicPermission implementation contradicts the specification. In this class, the String
constant SUBSCRIBE is defined to be "subscribe". This is lower case,
This Message Is From an Untrusted Sender
|
You have not previously corresponded with this sender.
|
|
|
Dear Colleagues,
It seems to me that the published org.osgi.service.event.TopicPermission implementation contradicts the specification. In this class, the String constant SUBSCRIBE is defined to be "subscribe". This is lower case,
but the specification defined SUBSCRIBE to be uppercase and these strings are case sensitive. Am I missing something?
Sincerely,
James
On 3/27/23 12:38, Dr. James J. Hunt wrote:
Dear Colleagues,
Why is it necessary to validate the topic of an event each time an event is created? Would it not be better to be able to create a validated Topic Object and only have to validate the topic name once? We need and event bus that is efficient for high data
throughput on embedded systems, but do not want to use a nonstandard interface.
Sincerely,
James
_______________________________________________
osgi-technology-dev mailing list
osgi-technology-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://accounts.eclipse.org
|