[
https://issues.apache.org/jira/browse/SLING-5462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15121369#comment-15121369
]
Konrad Windszus edited comment on SLING-5462 at 1/28/16 1:09 PM:
-----------------------------------------------------------------
We should fix {{MockServiceReference.compareTo}} by relying on
{{ServiceUtil.getComparableForServiceRanking(properties, Order.ASCENDING)}}
internally. That way there is no need to implement the comparison somewhere
else. That way we could also replace the equals and hashCode methods.
was (Author: kwin):
We should fix {{MockServiceReference.compareTo}} by relying on
{{ServiceUtil.getComparableForServiceRanking(Order.ASCENDING, ...)}}
internally. That way there is no need to implement the comparison somewhere
else. I am pretty sure that
ServiceUtil.getComparableForServiceRanking(Order.ASCENDING) does it the right
way.
> MockServiceReference sorts in the wrong way w.r.t. service ranking
> ------------------------------------------------------------------
>
> Key: SLING-5462
> URL: https://issues.apache.org/jira/browse/SLING-5462
> Project: Sling
> Issue Type: Bug
> Components: Testing
> Affects Versions: Testing OSGi Mock 2.0.0
> Reporter: Bertrand Delacretaz
> Priority: Minor
>
> I'll add tests that demonstrate that, by comparing with the sorting done by a
> real OSGi framework.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)