camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: CAMEL-9250: Configure AllowUseOriginalMessage to be disabled by default if not in use.
Date Sat, 07 May 2016 17:18:00 GMT
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/2163d8e8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2163d8e8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2163d8e8

Branch: refs/heads/master
Commit: 2163d8e84033f460376a0706bb183a36094d825c
Parents: 10bc1e0
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat May 7 19:14:50 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat May 7 19:14:50 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/impl/DefaultExchange.java  | 10 ++++++----
 .../jms/JmsTransferExchangeFromSplitterTest.java          |  2 +-
 .../org/apache/camel/component/snmp/SnmpEndpoint.java     |  5 +++++
 3 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2163d8e8/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
index 923c0d8..0091b6e 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
@@ -92,10 +92,6 @@ public final class DefaultExchange implements Exchange {
     public Exchange copy(boolean safeCopy) {
         DefaultExchange exchange = new DefaultExchange(this);
 
-        if (hasProperties()) {
-            exchange.setProperties(safeCopyProperties(getProperties()));
-        }
-
         if (safeCopy) {
             exchange.getIn().setBody(getIn().getBody());
             exchange.getIn().setFault(getIn().isFault());
@@ -122,6 +118,12 @@ public final class DefaultExchange implements Exchange {
             }
         }
         exchange.setException(getException());
+
+        // copy properties after body as body may trigger lazy init
+        if (hasProperties()) {
+            exchange.setProperties(safeCopyProperties(getProperties()));
+        }
+
         return exchange;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/2163d8e8/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransferExchangeFromSplitterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransferExchangeFromSplitterTest.java
b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransferExchangeFromSplitterTest.java
index b04b4dd..4558c3d 100644
--- a/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransferExchangeFromSplitterTest.java
+++ b/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransferExchangeFromSplitterTest.java
@@ -42,7 +42,7 @@ public class JmsTransferExchangeFromSplitterTest extends CamelTestSupport
{
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("A", "B", "C");
         mock.allMessages().header("foo").isEqualTo("cheese");
-        mock.allMessages().property("bar").isEqualTo(123);
+        mock.allMessages().exchangeProperty("bar").isEqualTo(123);
 
         template.send("direct:start", new Processor() {
             public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/2163d8e8/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpEndpoint.java
b/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpEndpoint.java
index 2cc2730..858847a 100644
--- a/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpEndpoint.java
+++ b/components/camel-snmp/src/main/java/org/apache/camel/component/snmp/SnmpEndpoint.java
@@ -383,4 +383,9 @@ public class SnmpEndpoint extends DefaultPollingEndpoint {
         this.snmpContextEngineId = snmpContextEngineId;
     }
 
+    @Override
+    public String toString() {
+        // only show address to avoid user and password details to be shown
+        return "snmp://" + address;
+    }
 }


Mime
View raw message