camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r799728 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/ main/java/org/apache/camel/builder/ main/java/org/apache/camel/impl/ test/java/org/apache/camel/processor/enricher/
Date Fri, 31 Jul 2009 19:59:18 GMT
Author: hadrian
Date: Fri Jul 31 19:59:18 2009
New Revision: 799728

URL: http://svn.apache.org/viewvc?rev=799728&view=rev
Log:
CAMEL-316. Done. Last piece of cleanup.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java?rev=799728&r1=799727&r2=799728&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java Fri Jul 31 19:59:18
2009
@@ -218,14 +218,6 @@
     void setOut(Message out);
 
     /**
-     * Returns the fault message
-     *
-     * @return the fault
-     */
-    @Deprecated
-    Message getFault();
-
-    /**
      * Returns the exception associated with this exchange
      *
      * @return the exception (or null if no faults)

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java?rev=799728&r1=799727&r2=799728&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ProcessorBuilder.java Fri
Jul 31 19:59:18 2009
@@ -74,7 +74,8 @@
         return new Processor() {
             public void process(Exchange exchange) {
                 Object newBody = expression.evaluate(exchange, Object.class);
-                exchange.getFault().setBody(newBody);
+                exchange.getOut().setFault(true);
+                exchange.getOut().setBody(newBody);
             }
 
             @Override
@@ -125,7 +126,8 @@
         return new Processor() {
             public void process(Exchange exchange) {
                 Object value = expression.evaluate(exchange, Object.class);
-                exchange.getFault().setHeader(name, value);
+                exchange.getOut().setFault(true);
+                exchange.getOut().setHeader(name, value);
             }
 
             @Override
@@ -174,7 +176,8 @@
     public static Processor removeFaultHeader(final String name) {
         return new Processor() {
             public void process(Exchange exchange) {
-                exchange.getFault().removeHeader(name);
+                exchange.getOut().setFault(true);
+                exchange.getOut().removeHeader(name);
             }
 
             @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java?rev=799728&r1=799727&r2=799728&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java Fri Jul
31 19:59:18 2009
@@ -261,14 +261,6 @@
         this.fromEndpoint = fromEndpoint;
     }
 
-    public Message getFault() {
-        Message fault = getOut(true);
-        if (fault != null) {
-            fault.setFault(true);
-        }
-        return fault;
-    }
-
     public String getExchangeId() {
         if (exchangeId == null) {
             exchangeId = createExchangeId();

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java?rev=799728&r1=799727&r2=799728&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/FailureProcessor.java
Fri Jul 31 19:59:18 2009
@@ -35,7 +35,8 @@
         if (error) {
             throw new RuntimeException("failed");
         } else {
-            exchange.getFault().setBody("failed");
+            exchange.getOut().setFault(true);
+            exchange.getOut().setBody("failed");
         }
     }
 



Mime
View raw message