gnodet-bot commented on code in PR #31063:
URL: https://github.com/apache/camel/pull/31063#discussion_r4726287530
##########
core/camel-support/src/main/java/org/apache/camel/support/PropertyBindingSupport.java:
##########
@@ -670,7 +699,7 @@ private static boolean doSetPropertyValue(
if (!bound && reflection) {
// fallback to reflection based
bound = setSimplePropertyViaReflection(camelContext,
target, key, value, fluentBuilder, allowPrivateSetter,
- !literalValue && reflection, ignoreCase);
+ effReference, ignoreCase);
Review Comment:
The old expression `!literalValue && reflection` was equivalent to
`!literalValue` here because the enclosing `if (!bound && reflection)` guard
already asserts `reflection=true`. The new `effReference = reference &&
!literalValue` is a correct behavior change: when `reference=false`, we now
also skip reflection-based reference resolution
(`setSimplePropertyViaReflection` is called with `false`). This is intentional
and correct — a one-line comment would make the semantic shift explicit:
```suggestion
bound = setSimplePropertyViaReflection(camelContext,
target, key, value, fluentBuilder, allowPrivateSetter,
effReference, ignoreCase); // effReference =
reference && !literalValue: skip reference resolution when reference=false
```
--
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]