This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch camel-2.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.x by this push: new f04c435 CAMEL-13489: camel-undertow: consumer thrown NPE when the body cannot be converted to ByteBuffer f04c435 is described below commit f04c43592e125fae92dde4b82ed927f845071fc3 Author: lburgazzoli <lburgazz...@gmail.com> AuthorDate: Mon May 6 19:32:06 2019 +0200 CAMEL-13489: camel-undertow: consumer thrown NPE when the body cannot be converted to ByteBuffer --- .../main/java/org/apache/camel/component/undertow/UndertowConsumer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java index bcdec14..c1459af 100644 --- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java +++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowConsumer.java @@ -156,7 +156,7 @@ public class UndertowConsumer extends DefaultConsumer implements HttpHandler { httpExchange.getResponseHeaders().put(ExchangeHeaders.CONTENT_TYPE, MimeMappings.DEFAULT_MIME_MAPPINGS.get("txt")); httpExchange.getResponseSender().send("No response available"); } else { - ByteBuffer bodyAsByteBuffer = tc.convertTo(ByteBuffer.class, body); + ByteBuffer bodyAsByteBuffer = tc.mandatoryConvertTo(ByteBuffer.class, body); httpExchange.getResponseSender().send(bodyAsByteBuffer); } }