camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r641430 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/processor/ camel-core/src/test/java/org/apache/camel/builder/ camel-core/src/test/java/org/apache/camel/processor...
Date Wed, 26 Mar 2008 17:38:59 GMT
Author: hadrian
Date: Wed Mar 26 10:38:37 2008
New Revision: 641430

URL: http://svn.apache.org/viewvc?rev=641430&view=rev
Log:
CAMEL-399 - a bit of refactoring to use finallyBlock instead of the misleading handleAll
- moved component.uface as component/uface to make eclipse happy


Added:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockNoCatchTest.java
      - copied, changed from r641352, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllNoCatchTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockTest.java
      - copied, changed from r641352, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java
      - copied, changed from r641352, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithHandleAllPipelineTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java
      - copied, changed from r641352, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedHandleAllPipelineTest.java
    activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/
    activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component/uface/
      - copied from r641352, activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component.uface/
    activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/
    activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component/uface/
      - copied from r641352, activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component.uface/
    activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/
    activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component/uface/
      - copied from r641352, activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component.uface/
Removed:
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllNoCatchTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithHandleAllPipelineTest.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedHandleAllPipelineTest.java
    activemq/camel/trunk/components/camel-swing/src/main/java/org/apache/camel/component.uface/
    activemq/camel/trunk/components/camel-uface/src/main/java/org/apache/camel/component.uface/
    activemq/camel/trunk/components/camel-uface/src/test/java/org/apache/camel/component.uface/
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java?rev=641430&r1=641429&r2=641430&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TryType.java Wed
Mar 26 10:38:37 2008
@@ -76,7 +76,7 @@
         return this;
     }
 
-    public TryType handleAll() {
+    public TryType finallyBlock() {
         popBlock();
         FinallyType answer = new FinallyType();
         addOutput(answer);

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java?rev=641430&r1=641429&r2=641430&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
Wed Mar 26 10:38:37 2008
@@ -75,15 +75,15 @@
             } catch (Throwable ex) {
                 throw new RuntimeCamelException(ex);
             } finally {
-                handleAll(exchange);
+                processFinally(exchange);
             }
         } else {
-            handleAll(exchange);
+            processFinally(exchange);
         }
 
     }
 
-    private void handleAll(Exchange exchange) {
+    private void processFinally(Exchange exchange) {
         if (finallyProcessor != null) {
             Throwable lastException = exchange.getException();
             exchange.setException(null);

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java?rev=641430&r1=641429&r2=641430&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java
Wed Mar 26 10:38:37 2008
@@ -292,8 +292,8 @@
         return new RouteBuilder() {
             public void configure() {
                 from("direct:a").tryBlock().process(validator).process(toProcessor)
-                    .handle(ValidationException.class).process(orderProcessor).handleAll()
-                    .process(orderProcessor2).process(orderProcessor3); // continuation of
the handleAll clause
+                    .handle(ValidationException.class).process(orderProcessor).finallyBlock()
+                    .process(orderProcessor2).process(orderProcessor3); // continuation of
the finallyBlock clause
             }
         };
     };
@@ -331,7 +331,7 @@
         return new RouteBuilder() {
             public void configure() {
                 from("direct:a").tryBlock().process(validator).process(toProcessor)
-                    .handle(ValidationException.class).process(orderProcessor).handleAll()
+                    .handle(ValidationException.class).process(orderProcessor).finallyBlock()
                     .process(orderProcessor2).end().process(orderProcessor3);
             }
         };

Copied: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockNoCatchTest.java
(from r641352, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllNoCatchTest.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockNoCatchTest.java?p2=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockNoCatchTest.java&p1=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllNoCatchTest.java&r1=641352&r2=641430&rev=641430&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllNoCatchTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockNoCatchTest.java
Wed Mar 26 10:38:37 2008
@@ -27,7 +27,7 @@
  *
  * @author <a href="mailto:nsandhu@raleys.com">nsandhu</a>
  */
-public class ValidationHandleAllNoCatchTest extends ContextTestSupport {
+public class ValidationFinallyBlockNoCatchTest extends ContextTestSupport {
     protected Processor validator = new MyValidator();
     protected MockEndpoint validEndpoint;
     protected MockEndpoint allEndpoint;
@@ -66,7 +66,7 @@
                 TryType tryType = from("direct:start").tryBlock().
                         process(validator).
                         to("mock:valid");
-                tryType.handleAll().to("mock:all");
+                tryType.finallyBlock().to("mock:all");
             }
         };
     }

Copied: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockTest.java
(from r641352, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllTest.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockTest.java?p2=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockTest.java&p1=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllTest.java&r1=641352&r2=641430&rev=641430&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationHandleAllTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationFinallyBlockTest.java
Wed Mar 26 10:38:37 2008
@@ -24,11 +24,11 @@
 import org.apache.camel.model.TryType;
 
 /**
- * Test handleAll
+ * Test finallyBlock
  *
  * @author <a href="mailto:nsandhu@raleys.com">nsandhu</a>
  */
-public class ValidationHandleAllTest extends ContextTestSupport {
+public class ValidationFinallyBlockTest extends ContextTestSupport {
     protected Processor validator = new MyValidator();
     protected MockEndpoint validEndpoint;
     protected MockEndpoint invalidEndpoint;
@@ -70,7 +70,7 @@
                         process(validator).
                         to("mock:valid");
                 tryType.handle(ValidationException.class).to("mock:invalid");
-                tryType.handleAll().to("mock:all");
+                tryType.finallyBlock().to("mock:all");
             }
         };
     }

Copied: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java
(from r641352, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithHandleAllPipelineTest.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java?p2=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java&p1=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithHandleAllPipelineTest.java&r1=641352&r2=641430&rev=641430&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithHandleAllPipelineTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithFinallyBlockPipelineTest.java
Wed Mar 26 10:38:37 2008
@@ -12,7 +12,7 @@
  * @author <a href="mailto:nsandhu">nsandhu</a>
  * 
  */
-public class ValidationWithHandleAllPipelineTest extends ValidationTest {
+public class ValidationWithFinallyBlockPipelineTest extends ValidationTest {
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
@@ -22,7 +22,7 @@
                         .setHeader("valid", constant(true))
                     .handle(ValidationException.class)
                         .setHeader("valid", constant(false))
-                    .handleAll()
+                    .finallyBlock()
                         .setBody(body())
                         .choice()
                         .when(header("valid").isEqualTo(true))

Copied: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java
(from r641352, activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedHandleAllPipelineTest.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java?p2=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java&p1=activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedHandleAllPipelineTest.java&r1=641352&r2=641430&rev=641430&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedHandleAllPipelineTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ValidationWithNestedFinallyBlockPipelineTest.java
Wed Mar 26 10:38:37 2008
@@ -12,7 +12,7 @@
  * @author <a href="mailto:nsandhu">nsandhu</a>
  * 
  */
-public class ValidationWithNestedHandleAllPipelineTest extends ValidationTest {
+public class ValidationWithNestedFinallyBlockPipelineTest extends ValidationTest {
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
@@ -27,7 +27,7 @@
                     .tryBlock()
                         .process(validator)
                         .to("mock:valid")
-                    .handleAll()
+                    .finallyBlock()
                         .setHeader("valid", constant(false))
                     .end();
             }



Mime
View raw message