You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/12/12 09:04:18 UTC

[1/6] camel git commit: CAMEL-10582: Fixing copying of immutable Spring headers

Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x bea972e99 -> f0a40b39f
  refs/heads/camel-2.18.x 21c04b635 -> d5744422d
  refs/heads/master d28e4fd60 -> a5cd5de4a


CAMEL-10582: Fixing copying of immutable Spring headers


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

Branch: refs/heads/master
Commit: 6c7a5e72fe86aa3b449e3da803ed0dbf38529f6e
Parents: d28e4fd
Author: Boris Kuzmic <bo...@ericsson.com>
Authored: Fri Dec 9 16:35:34 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Dec 12 09:59:59 2016 +0100

----------------------------------------------------------------------
 .../integration/SpringIntegrationMessage.java   |  2 +-
 .../SpringIntegrationMessageTest.java           | 28 ++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6c7a5e72/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
index a5463d7..16187a9 100644
--- a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
+++ b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
@@ -53,7 +53,7 @@ public class SpringIntegrationMessage extends DefaultMessage {
 
         setMessageId(that.getMessageId());
         setBody(that.getBody());
-        getHeaders().putAll(that.getHeaders());
+        super.getHeaders().putAll(that.getHeaders());
         if (that instanceof SpringIntegrationMessage) {
             SpringIntegrationMessage orig = (SpringIntegrationMessage) that;
             setMessage(orig.getMessage());

http://git-wip-us.apache.org/repos/asf/camel/blob/6c7a5e72/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
new file mode 100644
index 0000000..0ab5dc7
--- /dev/null
+++ b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
@@ -0,0 +1,28 @@
+package org.apache.camel.component.spring.integration;
+
+import org.junit.Test;
+import org.springframework.messaging.support.MessageBuilder;
+
+import static org.junit.Assert.assertTrue;
+
+public class SpringIntegrationMessageTest {
+
+    @Test
+    public void testCopyFrom() {
+        org.springframework.messaging.Message testSpringMessage =
+            MessageBuilder.withPayload("Test")
+                .setHeader("header1", "value1")
+                .setHeader("header2", "value2")
+                .build();
+
+        SpringIntegrationMessage original = new SpringIntegrationMessage(testSpringMessage);
+
+        SpringIntegrationMessage copy = new SpringIntegrationMessage(testSpringMessage);
+
+        copy.copyFrom(original);
+
+        assertTrue(copy.getHeaders().containsKey("header1"));
+        assertTrue(copy.getHeaders().containsKey("header2"));
+    }
+
+}


[5/6] camel git commit: CAMEL-10582: Fixing copying of immutable Spring headers

Posted by da...@apache.org.
CAMEL-10582: Fixing copying of immutable Spring headers


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

Branch: refs/heads/camel-2.17.x
Commit: c577d4ea96d047afaf5f87082d6f652e03f744ac
Parents: bea972e
Author: Boris Kuzmic <bo...@ericsson.com>
Authored: Fri Dec 9 16:35:34 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Dec 12 10:03:58 2016 +0100

----------------------------------------------------------------------
 .../integration/SpringIntegrationMessage.java   |  2 +-
 .../SpringIntegrationMessageTest.java           | 28 ++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c577d4ea/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
index a5463d7..16187a9 100644
--- a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
+++ b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
@@ -53,7 +53,7 @@ public class SpringIntegrationMessage extends DefaultMessage {
 
         setMessageId(that.getMessageId());
         setBody(that.getBody());
-        getHeaders().putAll(that.getHeaders());
+        super.getHeaders().putAll(that.getHeaders());
         if (that instanceof SpringIntegrationMessage) {
             SpringIntegrationMessage orig = (SpringIntegrationMessage) that;
             setMessage(orig.getMessage());

http://git-wip-us.apache.org/repos/asf/camel/blob/c577d4ea/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
new file mode 100644
index 0000000..0ab5dc7
--- /dev/null
+++ b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
@@ -0,0 +1,28 @@
+package org.apache.camel.component.spring.integration;
+
+import org.junit.Test;
+import org.springframework.messaging.support.MessageBuilder;
+
+import static org.junit.Assert.assertTrue;
+
+public class SpringIntegrationMessageTest {
+
+    @Test
+    public void testCopyFrom() {
+        org.springframework.messaging.Message testSpringMessage =
+            MessageBuilder.withPayload("Test")
+                .setHeader("header1", "value1")
+                .setHeader("header2", "value2")
+                .build();
+
+        SpringIntegrationMessage original = new SpringIntegrationMessage(testSpringMessage);
+
+        SpringIntegrationMessage copy = new SpringIntegrationMessage(testSpringMessage);
+
+        copy.copyFrom(original);
+
+        assertTrue(copy.getHeaders().containsKey("header1"));
+        assertTrue(copy.getHeaders().containsKey("header2"));
+    }
+
+}


[6/6] camel git commit: CAMEL-10582: Fixed CS. This closes #1340

Posted by da...@apache.org.
CAMEL-10582: Fixed CS. This closes #1340


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

Branch: refs/heads/camel-2.17.x
Commit: f0a40b39f0d871c3d15cdd03b63b02d0f91cd455
Parents: c577d4e
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Dec 12 10:03:03 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Dec 12 10:04:04 2016 +0100

----------------------------------------------------------------------
 .../integration/SpringIntegrationMessageTest.java   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f0a40b39/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
index 0ab5dc7..2a28f24 100644
--- a/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
+++ b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.component.spring.integration;
 
 import org.junit.Test;


[2/6] camel git commit: CAMEL-10582: Fixed CS. This closes #1340

Posted by da...@apache.org.
CAMEL-10582: Fixed CS. This closes #1340


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

Branch: refs/heads/master
Commit: a5cd5de4a78c5be32bfad0f0eea50e21085ece04
Parents: 6c7a5e7
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Dec 12 10:03:03 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Dec 12 10:03:03 2016 +0100

----------------------------------------------------------------------
 .../integration/SpringIntegrationMessageTest.java   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a5cd5de4/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
index 0ab5dc7..2a28f24 100644
--- a/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
+++ b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.component.spring.integration;
 
 import org.junit.Test;


[4/6] camel git commit: CAMEL-10582: Fixed CS. This closes #1340

Posted by da...@apache.org.
CAMEL-10582: Fixed CS. This closes #1340


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

Branch: refs/heads/camel-2.18.x
Commit: d5744422dc24202eb1a8be35f53555e79205f5e2
Parents: 8f95d17
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Dec 12 10:03:03 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Dec 12 10:03:38 2016 +0100

----------------------------------------------------------------------
 .../integration/SpringIntegrationMessageTest.java   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d5744422/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
index 0ab5dc7..2a28f24 100644
--- a/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
+++ b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
@@ -1,3 +1,19 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.camel.component.spring.integration;
 
 import org.junit.Test;


[3/6] camel git commit: CAMEL-10582: Fixing copying of immutable Spring headers

Posted by da...@apache.org.
CAMEL-10582: Fixing copying of immutable Spring headers


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

Branch: refs/heads/camel-2.18.x
Commit: 8f95d17efcf63c405bb1f20545ef8017ee3425a8
Parents: 21c04b6
Author: Boris Kuzmic <bo...@ericsson.com>
Authored: Fri Dec 9 16:35:34 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Dec 12 10:03:32 2016 +0100

----------------------------------------------------------------------
 .../integration/SpringIntegrationMessage.java   |  2 +-
 .../SpringIntegrationMessageTest.java           | 28 ++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8f95d17e/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
index a5463d7..16187a9 100644
--- a/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
+++ b/components/camel-spring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationMessage.java
@@ -53,7 +53,7 @@ public class SpringIntegrationMessage extends DefaultMessage {
 
         setMessageId(that.getMessageId());
         setBody(that.getBody());
-        getHeaders().putAll(that.getHeaders());
+        super.getHeaders().putAll(that.getHeaders());
         if (that instanceof SpringIntegrationMessage) {
             SpringIntegrationMessage orig = (SpringIntegrationMessage) that;
             setMessage(orig.getMessage());

http://git-wip-us.apache.org/repos/asf/camel/blob/8f95d17e/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
new file mode 100644
index 0000000..0ab5dc7
--- /dev/null
+++ b/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationMessageTest.java
@@ -0,0 +1,28 @@
+package org.apache.camel.component.spring.integration;
+
+import org.junit.Test;
+import org.springframework.messaging.support.MessageBuilder;
+
+import static org.junit.Assert.assertTrue;
+
+public class SpringIntegrationMessageTest {
+
+    @Test
+    public void testCopyFrom() {
+        org.springframework.messaging.Message testSpringMessage =
+            MessageBuilder.withPayload("Test")
+                .setHeader("header1", "value1")
+                .setHeader("header2", "value2")
+                .build();
+
+        SpringIntegrationMessage original = new SpringIntegrationMessage(testSpringMessage);
+
+        SpringIntegrationMessage copy = new SpringIntegrationMessage(testSpringMessage);
+
+        copy.copyFrom(original);
+
+        assertTrue(copy.getHeaders().containsKey("header1"));
+        assertTrue(copy.getHeaders().containsKey("header2"));
+    }
+
+}