From 65aef3660065244b797aa38bf2dbc1be59a68920 Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Wed, 25 Mar 2009 15:03:58 +0000 Subject: [PATCH] getBody() does not throw exceptions any more, changed to 2.0 approach git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@758293 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/camel/component/JournalEndpoint.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java b/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java index 5d3a99169e..31e2f4a2e1 100644 --- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java +++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/JournalEndpoint.java @@ -190,9 +190,8 @@ public class JournalEndpoint extends DefaultEndpoint { incrementReference(); try { ByteSequence body = null; - try { - body = exchange.getIn().getBody(ByteSequence.class); - } catch(NoTypeConversionAvailableException e) { + body = exchange.getIn().getBody(ByteSequence.class); + if (body == null) { byte[] bytes = exchange.getIn().getBody(byte[].class); if (bytes != null) { body = new ByteSequence(bytes);