activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r534164 - /activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
Date Tue, 01 May 2007 17:29:36 GMT
Author: rajdavies
Date: Tue May  1 10:29:36 2007
New Revision: 534164

URL: http://svn.apache.org/viewvc?view=rev&rev=534164
Log:
can't make assumptions about the Exchange anymore

Modified:
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java?view=diff&rev=534164&r1=534163&r2=534164
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
(original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
Tue May  1 10:29:36 2007
@@ -49,11 +49,7 @@
         }
     }
 
-    @Override
-    public JmsExchange getExchange() {
-        return (JmsExchange) super.getExchange();
-    }
-
+       
     /**
      * Returns the underlying JMS message
      *
@@ -90,8 +86,9 @@
 
     @Override
     protected Object createBody() {
-        if (jmsMessage != null) {
-            return getExchange().getBinding().extractBodyFromJms(getExchange(), jmsMessage);
+        if (jmsMessage != null && getExchange() instanceof JmsExchange) {
+            JmsExchange exchange = (JmsExchange)getExchange();
+            return (exchange.getBinding().extractBodyFromJms(exchange, jmsMessage));
         }
         return null;
     }



Mime
View raw message