-
Bug
-
Resolution: Won't Do
-
Minor
-
2.0.1.GA
-
None
-
None
I have a method that produces both "text/plain" and "application/xml". Defined as:
@GET
@Path("/customDtos")
@Produces(
)
public List<CustomDto> getCustomDtos();
CustomDto is a JAXB annotated pojo.
isWriteable always returns true for CollectionProvider, even though it seems it cannot cater for "text/plain". CollectionProvider then fails in writeTo when it tries to find a JAXBContextFinder for "text/plain". Since CollectionProvider's isWriteable returns true my custom MessageBodyWriter is never reached.
Either the CollectionProvider isWriteable should have additional checks if it cannot cater for media type "text/plain" or application MessageBodyWriters should get precedence. Or am I missing something?
- is related to
-
RESTEASY-191 Custom message body writer preference
- Closed