camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r934870 - in /camel/trunk/camel-core/src/main/java/org/apache/camel: BinaryEvaluablePredicate.java BinaryPredicate.java builder/BinaryPredicateSupport.java util/PredicateAssertHelper.java
Date Fri, 16 Apr 2010 13:51:07 GMT
Author: davsclaus
Date: Fri Apr 16 13:51:06 2010
New Revision: 934870

URL: http://svn.apache.org/viewvc?rev=934870&view=rev
Log:
CAMEL-2651: Mock endpoints now report better assertion exception messages for binary based
predicates.

Added:
    camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryPredicate.java   (contents,
props changed)
      - copied, changed from r934869, camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryEvaluablePredicate.java
Removed:
    camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryEvaluablePredicate.java
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BinaryPredicateSupport.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java

Copied: camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryPredicate.java (from r934869,
camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryEvaluablePredicate.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryPredicate.java?p2=camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryPredicate.java&p1=camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryEvaluablePredicate.java&r1=934869&r2=934870&rev=934870&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryEvaluablePredicate.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryPredicate.java Fri Apr 16
13:51:06 2010
@@ -28,7 +28,7 @@ package org.apache.camel;
  *
  * @version $Revision$
  */
-public interface BinaryEvaluablePredicate extends Predicate {
+public interface BinaryPredicate extends Predicate {
 
     /**
      * Gets the operator

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryPredicate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/main/java/org/apache/camel/BinaryPredicate.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BinaryPredicateSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BinaryPredicateSupport.java?rev=934870&r1=934869&r2=934870&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BinaryPredicateSupport.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BinaryPredicateSupport.java
Fri Apr 16 13:51:06 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.camel.builder;
 
-import org.apache.camel.BinaryEvaluablePredicate;
+import org.apache.camel.BinaryPredicate;
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.Predicate;
@@ -28,7 +28,7 @@ import static org.apache.camel.util.Obje
  *
  * @version $Revision$
  */
-public abstract class BinaryPredicateSupport implements BinaryEvaluablePredicate {
+public abstract class BinaryPredicateSupport implements BinaryPredicate {
 
     private final Expression left;
     private final Expression right;

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java?rev=934870&r1=934869&r2=934870&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java
Fri Apr 16 13:51:06 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.camel.util;
 
-import org.apache.camel.BinaryEvaluablePredicate;
+import org.apache.camel.BinaryPredicate;
 import org.apache.camel.Exchange;
 import org.apache.camel.Predicate;
 
@@ -32,9 +32,9 @@ public final class PredicateAssertHelper
     }
 
     public static void assertMatches(Predicate predicate, String text, Exchange exchange)
{
-        if (predicate instanceof BinaryEvaluablePredicate) {
+        if (predicate instanceof BinaryPredicate) {
             // special for binary evaluable as we can get more detailed information
-            BinaryEvaluablePredicate eval = (BinaryEvaluablePredicate) predicate;
+            BinaryPredicate eval = (BinaryPredicate) predicate;
             if (!eval.matches(exchange)) {
                 String evalText = eval.getLeftValue() + " " + eval.getOperator() + " " +
eval.getRightValue();
                 if (text == null) {



Mime
View raw message