[ https://issues.apache.org/jira/browse/SLING-11919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Seifert closed SLING-11919. ---------------------------------- > [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 > Priority: Minor > Fix For: Testing OSGi Mock 3.3.10 > > > 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)