davsclaus opened a new pull request, #27993:
URL: https://github.com/apache/camel/pull/27993

   Backport of #27979 to `camel-4.22.x` 
([CAMEL-25715](https://issues.apache.org/jira/browse/CAMEL-25715)).
   
   `camel cmd eval` JSON-escaped the expression and the body before putting 
them in the action, which is JSON already. The `eval` action of the CLI 
connector reads the values as they are, so an expression with a double quote 
failed (`${body} == "hello"`: `Binary operator == does not accept \"hello\" on 
the right hand side`), and a slash, as in every XPath, or a quote in the body 
became part of the text.
   
   On this branch only `EvalExpressionCommand` has the bug: the AI tools that 
#27979 also fixed (`ExpressionEvaluator`, the `eval_expression` tool of 
`ToolRegistry`) are not on `camel-4.22.x`. So this is the same two-line change 
in that file, not a cherry-pick of the whole commit, with a test of what the 
command sends (`EvalExpressionCommandTest`, in the JUnit style of the module on 
this branch; main has the test in `EvalExpressionResultTest`).
   
   Not built locally: the 4.22.2-SNAPSHOT dependencies of camel-jbang-core are 
not in the local Maven repository, so CI runs the test. The test file passes 
the formatter of main unchanged.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01DDRLJAyf8cDXSg8iX785My
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to