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

Romain Manni-Bucau commented on CXF-6515:
-----------------------------------------

[~sergey_beryozkin] maybe I spotted something:

{code}
    private <T> void sortWriters() {
        if (providerComparator == null) {
            Collections.sort(messageWriters, new MessageBodyWriterComparator());
        } else {
            doCustomSort(messageWriters);
        }
    }
    
    private <T> void doCustomSort(List<?> listOfProviders) {
        @SuppressWarnings("unchecked")
        List<T> theProviders = (List<T>)messageReaders;
        @SuppressWarnings("unchecked")
        Comparator<? super T> theComparator = (Comparator<? super 
T>)providerComparator;
        Collections.sort((List<T>)theProviders, theComparator);
    }
{code}

seems listOfProviders is quite ignored so - and it matches my tests - 
messageReaders respects the comparator but not writers. Don't know I missed it 
before :).

> provider sorting not right
> --------------------------
>
>                 Key: CXF-6515
>                 URL: https://issues.apache.org/jira/browse/CXF-6515
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Romain Manni-Bucau
>            Assignee: Sergey Beryozkin
>             Fix For: 3.1.3, 3.0.7
>
>
> Didnt dig too much into it but seems sorting with a custom comparator is not 
> respected, can be linked to 6514, if this 6514 is fixed I'll test again to 
> confirm this one



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

Reply via email to