gnodet-bot commented on code in PR #30340:
URL: https://github.com/apache/camel/pull/30340#discussion_r4626554834


##########
core/camel-core-processor/src/main/java/org/apache/camel/processor/ProcessorHelper.java:
##########
@@ -84,8 +86,18 @@ static Object prepareRecipient(Exchange exchange, Object 
recipient) throws NoTyp
                 // convert to a string type we can work with
                 uri = ecc.getTypeConverter().mandatoryConvertTo(String.class, 
exchange, recipient);
             }
-            // optimize and normalize endpoint
-            return ecc.getCamelContextExtension().normalizeUri(uri);
+            // optimize and normalize endpoint. Property placeholders in the 
computed uri string are still resolved
+            // here (documented recipientList/routingSlip/dynamicRouter 
behaviour), but the uri was computed from the
+            // message, so its query option values are bound as literal text: 
no property-placeholder and no
+            // bean/class reference (#class:, #bean:, #type:, ...) resolution 
on the option values (CAMEL-27160).

Review Comment:
   Nit: this comment (and several parallel Javadoc blocks across 
`DefaultComponent.createEndpoint`, `Builder.withLiteral`, 
`NormalizedUri.isLiteralOptionBinding`, and `DefaultEndpoint.setProperties`) 
describe the blocked set as `#class:, #bean:, #type:, ...` — implying `#bean:` 
and `#type:` are also suppressed. The actual code only blocks `{{...}}` 
placeholders, `#class:` and `#property:`. `#bean:` and `#type:` are still 
resolved (the upgrade guide and `NormalizedUri` field comment correctly state 
this). Consider rewording to match:
   
   ```suggestion
               // optimize and normalize endpoint. Property placeholders in the 
computed uri string are still resolved
               // here (documented recipientList/routingSlip/dynamicRouter 
behaviour), but the uri was computed from the
               // message, so its query option values are bound as literal 
text: no property-placeholder, #class: or
               // #property: resolution on the option values; plain registry 
references (#bean:, #type:) are still resolved (CAMEL-27160).
   ```
   
   The same correction applies in the `@param literalOptionBinding` Javadoc in 
`DefaultComponent.createEndpoint(String,Map,boolean)`, 
`DefaultEndpoint.setProperties(Object,Map,boolean)`, `Builder.withLiteral()`, 
and `NormalizedUri.isLiteralOptionBinding()`.



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