You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/08/13 17:43:47 UTC
[jira] Commented: (CAMEL-3052) Simple binary operators - Prefer
numeric types over String
[ https://issues.apache.org/activemq/browse/CAMEL-3052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=61205#action_61205 ]
Claus Ibsen commented on CAMEL-3052:
------------------------------------
trunk: 985251.
> Simple binary operators - Prefer numeric types over String
> ----------------------------------------------------------
>
> Key: CAMEL-3052
> URL: https://issues.apache.org/activemq/browse/CAMEL-3052
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.4.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Fix For: 2.5.0
>
>
> If you use Simple for comparison and have
> {code}
> simple("${in.header.foo} > 100")
> {code}
> Then the type of foo is used first. And if that type is a String, then you compare with "100" and not the numeric value of 100.
> In those cases we should prefer the numeric type of the right hand side so we do a numeric vs. numeric comparison first.
> As any thing can be converted to String we should prefer String types last.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.