Claus Ibsen created CAMEL-25203:
-----------------------------------

             Summary: camel-java-io - Java DSL parser reads routes kept in 
local variables, setHeaders with plain values can be dumped
                 Key: CAMEL-25203
                 URL: https://issues.apache.org/jira/browse/CAMEL-25203
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Claus Ibsen


Two gaps of the Java DSL parser (CAMEL-25148) and the model dumpers, found 
while retiring the regex readers (CAMEL-25199) and checking the documentation 
examples (CAMEL-25182):

* A route built in steps through a local variable was not read: RouteDefinition 
route = from("direct:start"); route.split().body(); route.to("mock:split"); 
(also AggregateDefinition agg = from(...).aggregate(...); 
agg.completionSize(2);). The parser now builds such a route where it is 
declared and continues it on later statements.
* setHeaders and setVariables with plain values (setHeaders(Map.of("foo", 
"ABC")), setHeaders("a", 5)) wrapped each value in a Java-only constant 
expression, which the Java, XML and YAML dumpers cannot write (expression("")). 
A String, number, boolean or char is now the constant language (with its type 
as the result type), which gives the same value at runtime and every DSL can 
write.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to