Closed bjhargrave closed 9 years ago
Comment author: Jan Willem Janssen <janwillem.janssen@luminis.eu>
The current implementation of #verifyObjectClassProperty as defined in EndpointDescription is too strict as it only accepts arrays of string values. This while the examples in the RSA specification v1.0 use non-array values for the objectClass property (for example, see page 322 of OSGi Enterprise r5).
The #verifyObjectClassProperty method should be made more lenient when it comes to the given value: either a non-null string-value or a non-null, non-empty, array of strings should be acceptable for the objectClass property.
Comment author: @bjhargrave
For a ServiceRegistration, objectClass is always a String[]. So at runtime objectClass must be a String[]. See Table 122.1 where objectClass is defined as a String[]. objectClass is never a String.
The example on pg 322:
is wrong and that is what should be fixed. It should be:
to signify it is an array.
Comment author: @bjhargrave
(In reply to BJ Hargrave from comment BZ#1)
It should be:
com.acme.Foo to signify it is an array.
Actually, that is how to do it for a DS xml file. For the endpoint description schema, it should be:
Comment author: Jan Willem Janssen <janwillem.janssen@luminis.eu>
Indeed objectClass is an array of strings, I probably was confused by the convenience method on bundle context that accepts a single string as objectClass.
Nevertheless, the example on page 322 should be modified to reflect this.
Comment author: @bosschaert
Fixed in commit da8a6fabd25a129d3f6e762726f681593662de46
Original bug ID: BZ#2715 From: Jan Willem Janssen <janwillem.janssen@luminis.eu> Reported version: R6