Details
Description
When building a route including a choice with a single when() and without an otherwise(), the first SimpleExpression-when() is always satisfied:
from("direct:start") .choice() .when().simple(expression) // always routed to .to(whenTarget) .end() .to(end)
An empty otherwise() restores choice logic:
from("direct:start")
.choice()
.when().simple(expression).to(whenTarget)
.otherwise()
.end()
.to(end)
I included a simple Test-Case that fails with Camel 3.7.x and passes with Camel 3.6.x.