Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Sling Models Impl 1.2.6
-
None
Description
The injector is using BundleContext.getServiceReferences(Class, String) or SlingScriptHelper.getServices(Class, String) (https://github.com/apache/sling/blob/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/injectors/OSGiServiceInjector.java#L97). From the returned array it just takes the first item.
Unfortunately the order in that array is not-deterministic, especially it is not necessarily that way that items with a higher service.ranking are returned first.
Attachments
Attachments
Issue Links
- is related to
-
SLING-5665 SlingScriptHelper.getServices(Class, String) should return the highest matching service ranking first
- Closed