[
https://issues.apache.org/jira/browse/CAMEL-13489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luca Burgazzoli reassigned CAMEL-13489:
---------------------------------------
Assignee: Luca Burgazzoli
> camel-undertow: consumer thrown NPE when the body cannot be converted to
> ByteBuffer
> -----------------------------------------------------------------------------------
>
> Key: CAMEL-13489
> URL: https://issues.apache.org/jira/browse/CAMEL-13489
> Project: Camel
> Issue Type: Bug
> Components: camel-undertow
> Reporter: Luca Burgazzoli
> Assignee: Luca Burgazzoli
> Priority: Minor
> Fix For: 3.0.0
>
>
> Assuming we have a simple route like:
> {code}
> from("undertow:http://localhost:{{port}}/incompatibleData")
> .transform().constant(Collections.singletonMap("key", "val"));
> {code}
> This code will cause an NPE on UndertowConsumer because the body cannot be
> converted to a ByteBuffer [1], instead of an NPE we should use
> mandatoryConvertTo so the exception is more clear.
> [1]
> https://github.com/apache/camel/blob/master/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java#L156
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)