davsclaus opened a new pull request, #27652: URL: https://github.com/apache/camel/pull/27652
[CAMEL-25516](https://issues.apache.org/jira/browse/CAMEL-25516) A route that keeps a value in one place and reads it from another gets null, with no error. In the local-model benchmark's http-client example (CAMEL-24886) the model kept the line's sku in a header and logged `${exchangeProperty.sku}` (the log read `": x 2"`), or kept it in an exchange property and built the URI with `toD: http://localhost:8080/stock/${header.sku}`. The validator already says this for Camel's own names (`CamelTimerCounter is an exchange property set by timer, not a header`); this is the same for the route's own names. **The check** (`HeaderPropertyMixups`, with the YAML checks once the file has no other problem): for each route, the names it sets with `setHeader`/`setHeaders`, `setProperty`, `setVariable`/`setVariables`; then each `${header.X}`, `${exchangeProperty.X}` or `${variable.X}` (and the `headers`/`[X]` forms) whose name the route sets only as one of the other two is reported at its line: *"Line 95: ${exchangeProperty.sku} reads an exchange property sku, but the route keeps sku in a header (the exchange property is null here): write ${header.sku}"* **Quiet** for a route that consumes from an endpoint that can carry headers (only timer, scheduler, cron, quartz and file cannot), for a path parameter `{X}` of a rest or platform-http path, and for a name set in the form it is read. **Measured on the benchmark's routes:** none of the 1077 reference versions is reported; 3 of the 6976 model versions are (connect-http-client 2, contracts-openapi-client 1), each a real mix-up. Tests: `HeaderPropertyMixupsTest` (both directions, variables, the quiet cases, through `SourceValidator`); camel-jbang-core suite (1700) green. 🤖 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]
