davsclaus opened a new pull request, #31063: URL: https://github.com/apache/camel/pull/31063
_Claude Code on behalf of Claus Ibsen_ JIRA: https://issues.apache.org/jira/browse/CAMEL-27753 ## Problem `PropertyBindingSupport.Builder` has `withPlaceholder` ("Whether to use Camels property placeholder to resolve placeholders on keys and values") and `withReference` ("Whether reference parameter (syntax starts with #) is in use"). With both turned off, values were still resolved: `{{...}}` placeholders, `#property:`, `#class:` (including factory methods and arguments), `#bean:`, `#type:`, `#name`, `#autowired` and `#valueAs(type):value`. Only option names honored `withPlaceholder(false)`. ## Change - `doSetPropertyValue` resolves `#` values (`resolveValue`) only when references are on, and runs the second placeholder pass only when placeholders are on. - Placeholders in a `#property:` key and in a `#class:` value (constructor and factory method arguments too) are resolved only when placeholders are on. The public `resolveBean`, `newInstanceConstructorParameters` and `newInstanceFactoryParameters` keep their signature and behavior. - The reflection setter gets the reference flag (it was given the `reflection` flag), so `#name` is bound as given with references off. - Configurer based binding: `PropertyConfigurerSupport.property` resolves `#` references on its own, so the binder sets a thread-scoped flag around the configurer call when references are off (`PropertyBindingSupport.isReferenceBindingDisabled()`, restored in `finally`). - Javadoc of `withReference` and `withPlaceholder` describes the behavior; `withLiteral` also lists `#autowired` and `#valueAs(type):value`, which stay resolved in literal mode. - Defaults (both options on) and literal mode are unchanged. - Upgrade guide 4.24 entry. ## Tests - New `PropertyBindingSupportFlagsTest` (23 runs, reflection and configurer): each prefix resolved with the defaults and bound as given with the option off; keys not resolved with `withPlaceholder(false)`; nested keys skipped with `withNesting(false)`; the flag does not leak into the next binding; literal mode unchanged. - Existing camel-core binding, configurer, endpoint and properties tests pass (about 3000 tests), and the camel-spring cron tests (`SpringCronEndpoint` is the only in-tree caller that turns these options off). 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
