davsclaus opened a new pull request, #27375:
URL: https://github.com/apache/camel/pull/27375

   https://issues.apache.org/jira/browse/CAMEL-25330 (follow-up to #27359)
   
   The hint from #27359 only fired when the message body was the text being 
iterated. In the local-model benchmark the model also kept the JSON in a header 
and wrote `headers.skuList.find { it.sku == headers.sku }`, which fails the 
same way (`No such property: sku for class: java.lang.Byte`) while the body is 
a List, so the old message listed the script variables.
   
   When the missing property was looked up on a `Byte`, `Character` or `String`:
   - the body is text: as before, "the body is still text ... unmarshal it 
first"
   - a header holds JSON text: "header 'skuList' is still JSON text, not parsed 
data: parse it in the script with new 
groovy.json.JsonSlurper().parseText(headers.skuList), or set the header from 
the body after unmarshal: json"
   - otherwise: "the value read here is still text (a String comes from 
iterating text), not parsed data: ..."
   
   The bean and script-variable hints are unchanged.
   
   Tests: two new cases in `GroovyMissingPropertyHintTest`; camel-groovy suite 
green (119).
   
   🤖 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]

Reply via email to