[jira] Created: (CAMEL-150) Bug in PredicateBuilder

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-150) Bug in PredicateBuilder

JIRA jira@apache.org
Bug in PredicateBuilder
-----------------------

                 Key: CAMEL-150
                 URL: https://issues.apache.org/activemq/browse/CAMEL-150
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
            Reporter: Nicky Sandhu


PredicateBuilder reads
   public static <E extends Exchange> Predicate<E> isGreaterThanOrEqualTo(final Expression<E> left,
                                                                           final Expression<E> right) {
        return new BinaryPredicateSupport<E>(left, right) {

            protected boolean matches(E exchange, Object leftValue, Object rightValue) {
                return compare(leftValue, rightValue) < 0;
            }

            protected String getOperationText() {
                return ">=";
            }
        };
    }

This should be
 return compare(leftValue, rightValue) >= 0;

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-150) Bug in PredicateBuilder

JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved CAMEL-150.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.0
         Assignee: Guillaume Nodet

Fixed, thx for reporting this!

Sending        src/main/java/org/apache/camel/builder/PredicateBuilder.java
Transmitting file data .
Committed revision 576744.


> Bug in PredicateBuilder
> -----------------------
>
>                 Key: CAMEL-150
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-150
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Nicky Sandhu
>            Assignee: Guillaume Nodet
>             Fix For: 1.2.0
>
>
> PredicateBuilder reads
>    public static <E extends Exchange> Predicate<E> isGreaterThanOrEqualTo(final Expression<E> left,
>                                                                            final Expression<E> right) {
>         return new BinaryPredicateSupport<E>(left, right) {
>             protected boolean matches(E exchange, Object leftValue, Object rightValue) {
>                 return compare(leftValue, rightValue) < 0;
>             }
>             protected String getOperationText() {
>                 return ">=";
>             }
>         };
>     }
> This should be
>  return compare(leftValue, rightValue) >= 0;

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.