svn commit: r935325 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/model/ main/java/org/apache/camel/processor/aggregate/ test/java/org/apache/camel/processor/aggregator/

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r935325 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/model/ main/java/org/apache/camel/processor/aggregate/ test/java/org/apache/camel/processor/aggregator/

davsclaus-2
Author: davsclaus
Date: Sun Apr 18 10:08:37 2010
New Revision: 935325

URL: http://svn.apache.org/viewvc?rev=935325&view=rev
Log:
Renamed option on aggregator

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreInvalidCorrelationKeysTest.java   (contents, props changed)
      - copied, changed from r935197, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreBadCorrelationKeysTest.java
Removed:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreBadCorrelationKeysTest.java
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java?rev=935325&r1=935324&r2=935325&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java Sun Apr 18 10:08:37 2010
@@ -85,7 +85,7 @@ public class AggregateDefinition extends
     @XmlAttribute(required = false)
     private Boolean eagerCheckCompletion;
     @XmlAttribute(required = false)
-    private Boolean ignoreBadCorrelationKeys;
+    private Boolean ignoreInvalidCorrelationKeys;
     @XmlAttribute(required = false)
     private Integer closeCorrelationKeyOnCompletion;
 
@@ -193,8 +193,8 @@ public class AggregateDefinition extends
         if (isEagerCheckCompletion() != null) {
             answer.setEagerCheckCompletion(isEagerCheckCompletion());
         }
-        if (isIgnoreBadCorrelationKeys() != null) {
-            answer.setIgnoreBadCorrelationKeys(isIgnoreBadCorrelationKeys());
+        if (isIgnoreInvalidCorrelationKeys() != null) {
+            answer.setIgnoreBadCorrelationKeys(isIgnoreInvalidCorrelationKeys());
         }
         if (getCloseCorrelationKeyOnCompletion() != null) {
             answer.setCloseCorrelationKeyOnCompletion(getCloseCorrelationKeyOnCompletion());
@@ -341,12 +341,12 @@ public class AggregateDefinition extends
         this.eagerCheckCompletion = eagerCheckCompletion;
     }
 
-    public Boolean isIgnoreBadCorrelationKeys() {
-        return ignoreBadCorrelationKeys;
+    public Boolean isIgnoreInvalidCorrelationKeys() {
+        return ignoreInvalidCorrelationKeys;
     }
 
-    public void setIgnoreBadCorrelationKeys(Boolean ignoreBadCorrelationKeys) {
-        this.ignoreBadCorrelationKeys = ignoreBadCorrelationKeys;
+    public void setIgnoreInvalidCorrelationKeys(Boolean ignoreInvalidCorrelationKeys) {
+        this.ignoreInvalidCorrelationKeys = ignoreInvalidCorrelationKeys;
     }
 
     public Integer getCloseCorrelationKeyOnCompletion() {
@@ -393,8 +393,8 @@ public class AggregateDefinition extends
      *
      * @return builder
      */
-    public AggregateDefinition ignoreBadCorrelationKeys() {
-        setIgnoreBadCorrelationKeys(true);
+    public AggregateDefinition ignoreInvalidCorrelationKeys() {
+        setIgnoreInvalidCorrelationKeys(true);
         return this;
     }
 

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java?rev=935325&r1=935324&r2=935325&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java Sun Apr 18 10:08:37 2010
@@ -158,11 +158,11 @@ public class AggregateProcessor extends
             // we have a bad correlation key
             if (isIgnoreBadCorrelationKeys()) {
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("Correlation key could not be evaluated to a value. Exchange will be ignored: " + exchange);
+                    LOG.debug("Invalid correlation key. This Exchange will be ignored: " + exchange);
                 }
                 return;
             } else {
-                throw new CamelExchangeException("Correlation key could not be evaluated to a value", exchange);
+                throw new CamelExchangeException("Invalid correlation key", exchange);
             }
         }
 

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreInvalidCorrelationKeysTest.java (from r935197, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreBadCorrelationKeysTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreInvalidCorrelationKeysTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreInvalidCorrelationKeysTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreBadCorrelationKeysTest.java&r1=935197&r2=935325&rev=935325&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreBadCorrelationKeysTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreInvalidCorrelationKeysTest.java Sun Apr 18 10:08:37 2010
@@ -25,20 +25,20 @@ import org.apache.camel.processor.BodyIn
 /**
  * @version $Revision$
  */
-public class AggregateIgnoreBadCorrelationKeysTest extends ContextTestSupport {
+public class AggregateIgnoreInvalidCorrelationKeysTest extends ContextTestSupport {
 
     @Override
     public boolean isUseRouteBuilder() {
         return false;
     }
 
-    public void testAggregateIgnoreBadCorrelationKeys() throws Exception {
+    public void testAggregateIgnoreInvalidCorrelationKeys() throws Exception {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
                 from("direct:start")
                     .aggregate(header("id"), new BodyInAggregatingStrategy())
-                        .completionSize(2).ignoreBadCorrelationKeys()
+                        .completionSize(2).ignoreInvalidCorrelationKeys()
                         .to("mock:result");
             }
         });
@@ -56,7 +56,7 @@ public class AggregateIgnoreBadCorrelati
         assertMockEndpointsSatisfied();
     }
 
-    public void testAggregateNotIgnoreBadCorrelationKeys() throws Exception {
+    public void testAggregateNotIgnoreInvalidCorrelationKeys() throws Exception {
         context.addRoutes(new RouteBuilder() {
             @Override
             public void configure() throws Exception {
@@ -77,7 +77,7 @@ public class AggregateIgnoreBadCorrelati
             fail("Should throw an exception");
         } catch (CamelExecutionException e) {
             CamelExchangeException cause = assertIsInstanceOf(CamelExchangeException.class, e.getCause());
-            assertEquals("Correlation key could not be evaluated to a value. Exchange[Message: B]", cause.getMessage());
+            assertEquals("Invalid correlation key. Exchange[Message: B]", cause.getMessage());
         }
 
         template.sendBodyAndHeader("direct:start", "C", "id", 1);

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreInvalidCorrelationKeysTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateIgnoreInvalidCorrelationKeysTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date