davsclaus opened a new pull request, #26715: URL: https://github.com/apache/camel/pull/26715
Fixes https://issues.apache.org/jira/browse/CAMEL-24885 ```yaml - setBody: simple: "resource:templates/${header.type}.json" ``` ended in a `StackOverflowError`: `LanguageSupport.isDynamicResource` checked only the `resource:` prefix and a function, so `SimpleLanguage.createExpression` returned the lazy dynamic expression; at evaluation `ScriptHelper.resolveOptionalExternalScript`, which requires a scheme, returned the text unchanged, `createExpression` was called with the same text and returned the lazy expression again, without end. `isDynamicResource` now uses the loader's own test (`ScriptHelper.hasExternalScript`), so a scheme-less `resource:` text is a plain expression, as it already was without a function. `SimpleResourceWithoutSchemeTest` covers both cases and overflows without the fix. Found while testing CAMEL-24884. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj -- 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]
