Julian Sedding created SLING-11919:
--------------------------------------
Summary: [osgi-mock] Support R8 field injection of type Optional
Key: SLING-11919
URL: https://issues.apache.org/jira/browse/SLING-11919
Project: Sling
Issue Type: Improvement
Components: Testing
Affects Versions: Testing OSGi Mock 3.3.8
Reporter: Julian Sedding
Assignee: Julian Sedding
The OSGi R8 Declarative Services specification allows a component's field of
type {{Optional}} to be annotated with {{@Reference}}. In this case the
cardinality defaults to {{OPTIONAL}} and depending on the presence of the
service an empty {{Optional}}, or an {{Optional}} holding the service, is
injected.
Injecting fields of type {{Optional}} should be supported in {{osgi-mock}}.
See also
https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.component.html#service.component-field.injection
cc [~sseifert]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)