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 2011/10/23 16:25:52 UTC
svn commit: r1187894 - in /camel/branches/camel-2.8.x: ./
camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java
camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWhenSimpleOgnlTest.java
Author: davsclaus
Date: Sun Oct 23 14:25:52 2011
New Revision: 1187894
URL: http://svn.apache.org/viewvc?rev=1187894&view=rev
Log:
CAMEL-4513: Fixed simple ognl on exception function.
Added:
camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWhenSimpleOgnlTest.java
- copied unchanged from r1187893, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionWhenSimpleOgnlTest.java
Modified:
camel/branches/camel-2.8.x/ (props changed)
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 23 14:25:52 2011
@@ -1 +1 @@
-/camel/trunk:1186106,1186625,1186772,1187221,1187485,1187882
+/camel/trunk:1186106,1186625,1186772,1187221,1187485,1187882,1187893
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java?rev=1187894&r1=1187893&r2=1187894&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java (original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java Sun Oct 23 14:25:52 2011
@@ -154,6 +154,9 @@ public class BeanExpression implements E
try {
// copy the original exchange to avoid side effects on it
Exchange resultExchange = exchange.copy();
+ // remove any existing exception in case we do OGNL on the exception
+ resultExchange.setException(null);
+
// force to use InOut to retrieve the result on the OUT message
resultExchange.setPattern(ExchangePattern.InOut);
processor.process(resultExchange);
@@ -195,6 +198,8 @@ public class BeanExpression implements E
public void process(Exchange exchange) throws Exception {
// copy the original exchange to avoid side effects on it
Exchange resultExchange = exchange.copy();
+ // remove any existing exception in case we do OGNL on the exception
+ resultExchange.setException(null);
// force to use InOut to retrieve the result on the OUT message
resultExchange.setPattern(ExchangePattern.InOut);