[
https://issues.apache.org/jira/browse/CAMEL-25045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-25045.
---------------------------------
Resolution: Fixed
Merged to main in https://github.com/apache/camel/pull/26926
(11a0917b16982692014585754e5fa68a78c9b4bd).
_Claude Code on behalf of davsclaus_
> camel-core - Java DSL builders: fix bugs found in a deep review
> ---------------------------------------------------------------
>
> Key: CAMEL-25045
> URL: https://issues.apache.org/jira/browse/CAMEL-25045
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.23.0
>
>
> A deep review of the Java DSL builders (ProcessorDefinition,
> ExpressionClauseSupport) found the bugs below. Each one was reproduced
> against 4.23.0-SNAPSHOT and has a test that fails without the fix.
> # *{{choice().note(...)}} fails with StackOverflowError.* When the choice has
> no when/otherwise yet, note() called itself instead of setNote (CAMEL-22576).
> # *{{throttle(Expression, long correlationExpressionKey)}} ignores the key.*
> It used the maximum-requests expression as the correlation expression too, so
> exchanges were grouped by the maximum value. Regression in 4.19.
> # *{{onException(e1, e2, e3)}} in a route configuration drops the third
> exception.* It passed {{e2}} twice, so the third exception type was not
> handled (CAMEL-22529).
> # *{{simple(text, resultType, pretty, trimResult)}} ignores trimResult.* The
> three-argument variant sets it.
> # *{{endDoTry()}} from a block inside doCatch or doFinally fails with
> ClassCastException.* For example
> {{doCatch(E.class).filter(...).to(...).endDoTry().doFinally()}}: end()
> returns the catch, not the try.
> # *{{enrichWith(EndpointProducerBuilder)}} makes the uri a constant.* The
> other endpoint-builder overloads of enrich/enrichWith use a simple
> expression, so {{enrichWith(direct("${header.target}"))}} was not dynamic.
> # *The {{type:}} prefix of {{bean(...)}} only works in {{bean(Object, String
> method)}}.* {{bean("type:com.foo.MyBean")}} and the BeanScope variants looked
> up a bean named "type:com.foo.MyBean" (CAMEL-19244).
> _Claude Code on behalf of Claus Ibsen_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)