Felix Meschberger created SLING-4656:
----------------------------------------
Summary: ProviderHandler implements compareTo incorreclty
Key: SLING-4656
URL: https://issues.apache.org/jira/browse/SLING-4656
Project: Sling
Issue Type: Bug
Components: ResourceResolver
Affects Versions: Resource Resolver 1.2.4
Reporter: Felix Meschberger
The implementation of the ResourceResolver's compareTo method is wrong as it
favors services registered later over services registered earlier, while older
services should actually be preferred (assuming there sevice.ranking values are
equal).
While at it, the extraction of the service.ranking property is overly complex
since it first checks for null and then for the correct type. This can be
simplified by just checking for the correct type as a null value never matches
any type.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)