[ 
https://issues.apache.org/jira/browse/TAMAYA-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15762560#comment-15762560
 ] 

ASF subversion and git services commented on TAMAYA-199:
--------------------------------------------------------

Commit 33722ab03c1900adb94730b52a6543e59844e14d in incubator-tamaya's branch 
refs/heads/master from [~anatole]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-tamaya.git;h=33722ab ]

TAMAYA-199: Ensured ServiceContext does sort services along their priorities, 
reusing existing comparators.


> DefaultServiceContext.getServices does not return the services as sorted list
> -----------------------------------------------------------------------------
>
>                 Key: TAMAYA-199
>                 URL: https://issues.apache.org/jira/browse/TAMAYA-199
>             Project: Tamaya
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.3-incubating
>            Reporter: Thomas Liebetraut
>            Assignee: Anatole Tresch
>         Attachments: TAMAYA-199.patch
>
>
> At some places in the code, for instance in tamaya-formats, 
> {{ConfigurationFormats.getFormats()}} the code relies on a list of loaded 
> services to be sorted by priority.
> This is an assumption that is wrong and results in 
> {{ConfigurationFormats.getFormats()}} to violate its documentation. The 
> formats are in the order that the ServiceLoader found them, not sorted by 
> priority.
> While the documentation of {{DefaultServiceContext.getServices}} does not 
> explicitly state an order, I think it would make most sense to sort the list 
> there. If a service client doesn't care about the order, an ordered list 
> won't be a problem, but if a client cares about the order (like in 
> tamaya-formats), it doesn't have to implement the sorting over and over again.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to