Description
Problem is within the class: org.apache.cxf.jaxrs.impl.VariantListBuilderImpl
After calling:
List<Variant> variants = Variant.mediaTypes(MediaType.APPLICATION_XML_TYPE, MediaType.APPLICATION_JSON_TYPE).build();
The variants list is empty. To get the expected result you need to call add() before build(). But API states that there should be no need for that. Even example from the API doesn't add the "German" variant.
List list = VariantListBuilder.newInstance() .languages(Locale.ENGLISH, Locale.FRENCH).encodings("zip", "identity").add() .languages(Locale.GERMAN).mediaTypes(MediaType.TEXT_PLAIN_TYPE) .build()