[
https://issues.apache.org/jira/browse/CAMEL-24580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen closed CAMEL-24580.
-------------------------------
Resolution: Information Provided
Closing as Information Provided: the numeric-favouring == comparison for
all-digit strings is intentional, long-standing behaviour (CAMEL-15587). Filed
CAMEL-24582 to track adding dedicated equals/!equals operators to Simple for
literal string comparison, for anyone who needs that semantics without relying
on ==.
_Posted by Claude Code on behalf of davsclaus_
> simple predicate always casts digital strings as numbers
> --------------------------------------------------------
>
> Key: CAMEL-24580
> URL: https://issues.apache.org/jira/browse/CAMEL-24580
> Project: Camel
> Issue Type: Bug
> Components: came-core
> Reporter: Ivan Ravin
> Assignee: Karol Krawczyk
> Priority: Major
>
> Due to this error, strings with leading zeros are compared incorrectly
> {code:java}
> from("timer:test?repeatCount=1&delay=1000")
> .setHeader("Account1").constant("0001")
> .setHeader("Account2").constant("001")
> .filter().simple("${header.Account1} == ${header.Account2}")
> .log(LoggingLevel.ERROR, "Accounts not equals")
> .end(); {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)