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 2013/07/17 13:39:42 UTC
[2/8] git commit: CAMEL-6505: GenericFileMessage fixed copyFrom to
copy the generic file also.
CAMEL-6505: GenericFileMessage fixed copyFrom to copy the generic file also.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1a4baeed
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1a4baeed
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1a4baeed
Branch: refs/heads/master
Commit: 1a4baeedfbad78a204bc43cf1b261137fea7cf96
Parents: 6fbf115
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jul 17 12:04:39 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jul 17 12:04:39 2013 +0200
----------------------------------------------------------------------
.../apache/camel/component/file/GenericFileMessage.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1a4baeed/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
index 161e8e3..703c832 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.component.file;
+import org.apache.camel.Message;
import org.apache.camel.impl.DefaultMessage;
/**
@@ -50,6 +51,16 @@ public class GenericFileMessage<T> extends DefaultMessage {
}
@Override
+ @SuppressWarnings("unchecked")
+ public void copyFrom(Message that) {
+ super.copyFrom(that);
+
+ if (that instanceof GenericFileMessage) {
+ setGenericFile(((GenericFileMessage) that).getGenericFile());
+ }
+ }
+
+ @Override
public String toString() {
// only output the filename as body can be big
if (file != null) {