camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: CAMEL-9250: Configure AllowUseOriginalMessage to be disabled by default if not in use.
Date Sat, 07 May 2016 17:17:59 GMT
Repository: camel
Updated Branches:
  refs/heads/master e27f4f7eb -> 2163d8e84


CAMEL-9250: Configure AllowUseOriginalMessage to be disabled by default if not in use.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/10bc1e05
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/10bc1e05
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/10bc1e05

Branch: refs/heads/master
Commit: 10bc1e056588d61476962b3e4c468c593530f913
Parents: e27f4f7
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat May 7 17:39:14 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat May 7 17:39:14 2016 +0200

----------------------------------------------------------------------
 .../apache/camel/component/jms/JmsMessage.java  | 21 ++------------------
 1 file changed, 2 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/10bc1e05/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
index c75cdde..fc307fb 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
@@ -161,25 +161,8 @@ public class JmsMessage extends DefaultMessage {
     }
 
     public Object getHeader(String name) {
-        Object answer = null;
-
-        // we will exclude using JMS-prefixed headers here to avoid strangeness with some
JMS providers
-        // e.g. ActiveMQ returns the String not the Destination type for "JMSReplyTo"!
-        // only look in jms message directly if we have not populated headers
-        if (jmsMessage != null && !hasPopulatedHeaders() && !name.startsWith("JMS"))
{
-            try {
-                // use binding to do the lookup as it has to consider using encoded keys
-                answer = getBinding().getObjectProperty(jmsMessage, name);
-            } catch (JMSException e) {
-                throw new RuntimeExchangeException("Unable to retrieve header from JMS Message:
" + name, getExchange(), e);
-            }
-        }
-        // only look if we have populated headers otherwise there are no headers at all
-        // if we do lookup a header starting with JMS then force a lookup
-        if (answer == null && (hasPopulatedHeaders() || name.startsWith("JMS")))
{
-            answer = super.getHeader(name);
-        }
-        return answer;
+        ensureInitialHeaders();
+        return super.getHeader(name);
     }
 
     @Override


Mime
View raw message