cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-7440) VariantListBuilderImpl build() don't work without add method
Date Wed, 12 Jul 2017 10:11:00 GMT

     [ https://issues.apache.org/jira/browse/CXF-7440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Beryozkin resolved CXF-7440.
-----------------------------------
       Resolution: Fixed
         Assignee: Sergey Beryozkin
    Fix Version/s: 3.2.0
                   3.1.13
                   3.0.15

> VariantListBuilderImpl build() don't work without add method
> ------------------------------------------------------------
>
>                 Key: CXF-7440
>                 URL: https://issues.apache.org/jira/browse/CXF-7440
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.1.8
>            Reporter: Michal Olsza
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>             Fix For: 3.0.15, 3.1.13, 3.2.0
>
>
> Problem is within the class: {{org.apache.cxf.jaxrs.impl.VariantListBuilderImpl}}
> After calling:
> {code}
> List<Variant> variants = Variant.mediaTypes(MediaType.APPLICATION_XML_TYPE, MediaType.APPLICATION_JSON_TYPE).build();
> {code}
> The {{variants}} list is empty. To get the expected result you need to call {{add()}}
before {{build()}}. But [API states|http://docs.oracle.com/javaee/7/api/javax/ws/rs/core/Variant.VariantListBuilder.html#build--]
that there should be no need for that. Even example from the API doesn't add the "German"
variant.
> {code}
> List list = VariantListBuilder.newInstance()
>          .languages(Locale.ENGLISH, Locale.FRENCH).encodings("zip", "identity").add()
>          .languages(Locale.GERMAN).mediaTypes(MediaType.TEXT_PLAIN_TYPE)
>          .build()
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message