oscerd commented on PR #30340:
URL: https://github.com/apache/camel/pull/30340#issuecomment-7003487540

   Thanks for the reviews. Pushed a follow-up (f8b56e7) that addresses all 
points.
   
   **@davsclaus** — the three issues:
   
   1. **Most components bind their options before the flag is checked.** Fixed. 
Literal binding is now a creation *scope* rather than the single flag: 
`DefaultComponent.createEndpoint(uri, props, true)` opens a 
`PropertyBindingSupport` literal scope (try/finally) around the whole creation, 
and `DefaultEndpoint.setProperties(bean, parameters)` reads it. So options a 
component binds inside its own `createEndpoint` (the two-argument 
`setProperties` path used by `log`, `aws2-s3`, `sql`, `jms` and the rest) are 
bound literally too. Added a self-binding test component that binds like those, 
with `toD`+`#class:` and `toD`+`{{...}}` cases.
   
   2. **A `#bean:` reference written in the `toD` text is now bound as text.** 
Fixed. Literal mode is narrowed to `{{...}}` placeholders, `#class:` and 
`#property:`; `#bean:` and `#type:` (plain registry lookups) still resolve, so 
`toD("sql:${header.q}?dataSource=#ds")` and `connectionFactory=#cf` keep 
working. The `#class:` case is now called out in the upgrade guide. The test 
asserts `#bean:` resolves and `#property:` stays literal.
   
   3. **Docs check.** Fixed — escaped the `{{...}}` samples in the 
upgrade-guide entry as `+...+` passthroughs.
   
   gnodet-bot:
   - Silent fallback for a non-`DefaultEndpoint` endpoint: added a `LOG.warn`, 
since the scope is only enforced through `DefaultEndpoint`.
   - `NormalizedUri` comment: updated for the intent and the narrower behavior.
   - `effReference` at the regular-key reflection call: that 7th argument is 
the reflection gate (now `!literalValue && reflection`), not the reference flag 
`effReference` used in the collection-key path -- they control different 
things, so I kept it as the reflection gate.
   - `isSingleton()` note: left as-is for this PR's scope.
   
   Local run: `DynamicEndpointMessageOptionLiteralTest` 11/11, 
`DynamicEndpointMessagePlaceholderTest` 8/8, and the camel-support / camel-core 
property-binding tests all pass.
   
   _Claude Code on behalf of oscerd_
   


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