gnodet opened a new pull request, #21969: URL: https://github.com/apache/camel/pull/21969
## Summary - Adds validation in `BasicOutputExpressionNode.setExpression()` to detect when an expression element (e.g. `<method>`) appears after processing steps inside a `<when>` clause in XML/YAML DSL - Previously, a `<method>` element placed after `<log>` or other steps in a `<when>` clause would silently overwrite the predicate expression instead of being treated as a processor or raising an error - The validation correctly skips the check for Java DSL where `ExpressionClause` is legitimately resolved to the actual expression during `preCreateProcessor()` ## Test plan - Added `testMethodAfterStepsInWhenClauseShouldFail` to verify that placing `<method>` after processing steps in a `<when>` clause raises an error - Added `testMethodAsPredicateInWhenClauseShouldWork` to verify that `<method>` as the first (and only expression) child of `<when>` still works correctly - Verified all existing Choice/When tests pass (144 tests in camel-core, 21 tests in camel-xml-io) -- 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]
