You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2009/06/25 04:18:39 UTC

svn commit: r788240 - /camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java

Author: hadrian
Date: Thu Jun 25 02:18:38 2009
New Revision: 788240

URL: http://svn.apache.org/viewvc?rev=788240&view=rev
Log:
CAMEL-1078.  Remove dependency on Exchange creating an inner message and rely on message copies instead.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java?rev=788240&r1=788239&r2=788240&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/Pipeline.java Thu Jun 25 02:18:38 2009
@@ -135,12 +135,8 @@
 
         // now lets set the input of the next exchange to the output of the
         // previous message if it is not null
-        Message in = answer.getIn();
-        if (previousExchange.hasOut()) {
-            in.copyFrom(previousExchange.getOut());
-        } else {
-            in.copyFrom(previousExchange.getIn());
-        }
+        answer.setIn(previousExchange.hasOut() 
+            ? previousExchange.getOut().copy() : previousExchange.getIn().copy());
         return answer;
     }