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

   `SimpleSyntaxHints.wrapFunctions` wraps the function references of a 
predicate written inside `${ }`, and of the condition of a ternary there 
(CAMEL-24920). It split the text at its first operator outside quotes, also 
when the operator was in an index or an argument.
   
   From the local-model benchmark of Oct 21-22 2026, a model wrote:
   
   ```
   ${body.?[qty < 1].size() > 0 ? 'not enough' : 'reserved'}
   ```
   
   and the error quoted text it never wrote, with a closing brace after `qty`:
   
   ```
   expected symbol whiteSpace but was character: operators and values must be 
separated by a space at location 17
   ${body.?[qty} < 1].size() > 0
   ```
   
   `${iif(header.a > 0 && header.b > 0, 'x', 'y')}` was split the same way, at 
the `&&` and the `>`.
   
   The comparison operators and the logical `&&` and `||` now count only 
outside quotes, brackets and parentheses. The example above parses as written, 
and what the index means is left to the runtime, whose OGNL error is about the 
text as written.
   
   Tests: the Simple tests of camel-core (689) and the Simple, validator and 
expression tests of camel-jbang-core, all green. New test 
`SimpleSyntaxHintsTest.testAnOperatorInsideBracketsOrParenthesesIsNotSplit`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
   


-- 
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