Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
configadmin-1.2.8
-
None
Description
The RankingComparator class is used for two cases: ordering ConfigurationPlugin services as per the service.cmRanking property and ordering services as per the service.ranking property. These orderings are slightly different for which the class does not provide properly:
- service.cmRanking sorts ascending and does not define an order amongst services with the same cmRanking value
- service.ranking sorts in descending property value order and defines to fall back to service.id ordering (ascending) in case of equal service.ranking values.
The RankingComparator should be fixed (and simplified) to cope with these two mechanisms.
This should also be tested using unit tests.