davsclaus opened a new pull request, #27359: URL: https://github.com/apache/camel/pull/27359
https://issues.apache.org/jira/browse/CAMEL-25330 A Groovy expression such as `body.find { it.sku == headers.sku }` on a body that was never unmarshalled iterates the bytes (or characters) of the payload and fails with `No such property: sku for class: java.lang.Byte`. The hint used to list the script variables, which were not the problem. When the missing property was looked up on a `Byte`, `Character` or `String` and the body is a `byte[]` or `String`, the hint now says: the body is still text (a byte[]), not parsed data: unmarshal it first (unmarshal: json for JSON) to read its fields. Found in the local-model benchmark (contracts/openapi-server): 2 of 5 runs left out the unmarshal before a Groovy lookup and got the old message. Tests: `GroovyMissingPropertyHintTest` (byte[], String, and a parsed List that still works). 🤖 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]
