> On 18 Apr 2016, at 09:47, Bertrand Delacretaz <[email protected]> wrote: > > Hi, > > On Fri, Apr 15, 2016 at 3:07 PM, Konrad Windszus <[email protected]> wrote: >> ...I would propose to stick to a predefined order in the returned array: >> https://issues.apache.org/jira/browse/SLING-5665 > > That looks good to me, I have added a test there. > >> ... Does anyone have any idea how to sort the services according to their >> ranking >> being returned by SlingScriptHelper.getServices(...)... > > Isn't that what SLING-5665 does with your patch? Not sure what you're > missing on top of that. > No actually I had to remove usage of SlingScriptHelper.getService(...) completely in the patch https://issues.apache.org/jira/browse/SLING-5664 <https://issues.apache.org/jira/browse/SLING-5664> (because I don't want to require the fix from SLING-5665 in Sling Models). So I guess it is just not feasible to apply the sorting on the returned Service interfaces (not on the ServiceReferences!!!), at least I don't have a good idea on how to solve.
> -Bertrand
