cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-5970) review org.apache.cxf.jaxrs.provider.ProviderFactory.Message*ReaderComparator
Date Tue, 26 Aug 2014 14:46:57 GMT


Sergey Beryozkin commented on CXF-5970:

But the test confirms that CXF ProviderFactory does not change the order of the registration
for providers with identical properties, the providers which are equal candidates. If so then
disabling the sorting would not fix the issue anyway, right ? I.e, if the order of providers
can not be controlled (say they've been auto-discovered) then there's nothing ProviderFactory
can do...

I'm thinking that may be JAX-RS 2.1 should use @Priority as the final key when sorting MBR
and MBW, let me open the enhancement request...

Cheers, Sergey 

> review org.apache.cxf.jaxrs.provider.ProviderFactory.Message*ReaderComparator
> -----------------------------------------------------------------------------
>                 Key: CXF-5970
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Romain Manni-Bucau
>            Assignee: Sergey Beryozkin
> Actually the task can be rephrase saying rework org.apache.cxf.jaxrs.provider.ProviderFactory#*Comparators
> Current implementations don't seem to have an absolute order which means sorting is not
as deterministic as it should be under java >= 7.
> Other point is as a user you set a List of providers (you probably already sorted if
important) so you want to ensure *your* order is respected at runtime (ie org.apache.cxf.jaxrs.provider.ProviderFactory#message[Readers|Writers]
respect it).
> If you think this sorting is important maybe introducing in org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean
and org.apache.cxf.jaxrs.provider.ProviderFactory a boolean sortProviders can be enough to
prevent calling sortXXX().

This message was sent by Atlassian JIRA

View raw message