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

   # Description
   
   `SimpleFunctionExpression` shares the same `Map<String, Expression>` cache 
instance with the
   expression-level cache (`SimpleExpressionParser`, `SimplePredicateParser`). 
Without key namespacing,
   a function name like `body` could collide with any other entry stored under 
the same string,
   causing the wrong `Expression` to be returned silently.
   
   This commit introduces a `@FUNC@` prefix constant in 
`SimpleFunctionExpression` and applies it
   on every cache read and write. The prefix is intentional: `@` is not a valid 
character in a
   Simple function name, so `@FUNC@body` can never collide with any 
expression-level key.
   
   This issue was discovered during the work on CAMEL-22894.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-23800) 
filed for the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
   _Claude Code on behalf of Adriano Machado_


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