You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ComponentPropertyTypes do not test marker annotations as mentioned by the spec, instead the testcase NameMapping is using a marker annotation on an @Deactivate method (not annotated with @ComponentPropertyType)
and then asserts that such a property is added to the component.
Even though it is not really forbidden by the spec to do so it is a quite confusing way to specify such a property and even the spec claim:
Marker annotations can be used to annotate component implementation classes to set a component property to the value Boolean.TRUE. However, since marker annotations have no methods, they are of no use as parameter types in the component's constructor and life cycle methods, or as field types for activation fields.
My suggestion therefore would be to add at least a testcase with the recommended usage of such marker annotation and probably not use discouraged usages in TCKs.
The text was updated successfully, but these errors were encountered:
laeubi
changed the title
[ds tck] Marker annotations are only tested in a way not recommended by the spec
[ds annotation tck] Marker annotations are only tested in a way not recommended by the spec
Jan 23, 2024
The ComponentPropertyTypes do not test marker annotations as mentioned by the spec, instead the testcase NameMapping is using a marker annotation on an
@Deactivate
method (not annotated with@ComponentPropertyType
)osgi/org.osgi.impl.bundle.component.annotations/src/org/osgi/impl/bundle/component/annotations/NameMapping.java
Lines 82 to 84 in 8ab4f46
and then asserts that such a property is added to the component.
Even though it is not really forbidden by the spec to do so it is a quite confusing way to specify such a property and even the spec claim:
My suggestion therefore would be to add at least a testcase with the recommended usage of such marker annotation and probably not use discouraged usages in TCKs.
The text was updated successfully, but these errors were encountered: