[
https://issues.apache.org/jira/browse/SLING-11029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634314#comment-17634314
]
Joerg Hoh commented on SLING-11029:
-----------------------------------
I was checking with [~cziegeler] offline and we found that this change does not
any benefit (also not from a performance point of view).
We decided to drop this approach.
> OSGiServiceInjector.getService() should rely on framework
> ---------------------------------------------------------
>
> Key: SLING-11029
> URL: https://issues.apache.org/jira/browse/SLING-11029
> Project: Sling
> Issue Type: Improvement
> Components: Sling Models
> Affects Versions: Models Implementation 1.5.0
> Reporter: Carsten Ziegeler
> Priority: Major
> Fix For: Models Implementation 1.5.4
>
>
> Looking at
> https://github.com/apache/sling-org-apache-sling-models-impl/blob/master/src/main/java/org/apache/sling/models/impl/injectors/OSGiServiceInjector.java#L102
> it seems to get all service references, sort them and then uses the one with
> the highest ranking.
> However BundleContext#getServiceReference() does exactly that, so it can be
> directly used
--
This message was sent by Atlassian Jira
(v8.20.10#820010)