Hi I took a look and found the bug, so I created a ticket https://issues.apache.org/jira/browse/CAMEL-17225
On Tue, Nov 23, 2021 at 2:29 PM Claus Ibsen <[email protected]> wrote: > > Hi > > Ah okay, so its that rarely used or/and builder that we only have in Java DSL. > Can you create a JIRA ticket. That or thingy need likely some init to > prepare the simple language. > > On Mon, Nov 22, 2021 at 12:22 PM Klug Andreas (CI/XDM1) > <[email protected]> wrote: > > > > Hello everyone, > > > > Can anybody pls. give me a hint whether there is a change between Camel > > 3.13.0 and 3.11.3 which might cause the following behavior? > > The body is a list having one entry. > > In 3.11.3 the or() evaluates to false. > > In 3.13.0 the or() evaluates to true. > > Is there anything I overlooked? > > > > .process(e->e.getMessage().setBody(Collections.singletonList("AN ENTRY"))) > > .choice() > > .when(body().isNull()) > > .log(INFO,"There is no list") > > .otherwise() > > .log(INFO,"There is a list") > > .end() > > > > .choice() > > .when(simple("${body.size()} == 0")) > > .log(INFO,"The list has no entries") > > .otherwise() > > .log(INFO,"The list has entries") > > .end() > > > > .choice() > > .when(or(body().isNull(),simple("${body.size()} == 0"))) > > .log(INFO,"There is no list or the list has no > > entries") > > .otherwise() > > .log(INFO,"There is a list having at least an > > entry") > > .end() > > > > Running that route with 3.11.3 results in: > > INFO test.route 481523C07BAAEC8-0000000000000006 > > There is a list > > INFO test.route 481523C07BAAEC8-0000000000000006 > > The list has entries > > INFO test.route 481523C07BAAEC8-0000000000000006 > > There is a list having at least an entry > > > > Running that route with 3.13.0 results in: > > INFO test.route 2BB218D90DB24AB-0000000000000016 > > There is a list > > INFO test.route 2BB218D90DB24AB-0000000000000016 > > The list has entries > > INFO test.route 2BB218D90DB24AB-0000000000000016 > > There is no list or the list has no entries > > > > > > > > Mit freundlichen Grüßen / Best regards > > > > Andreas Klug > > > > Middleware Development (CI/XDM1) > > Robert Bosch GmbH | Postfach 30 02 20 | 70442 Stuttgart | GERMANY | > > www.bosch.com > > > > Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000; > > Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar > > Denner, > > Prof. Dr. Stefan Asenkerschbaumer, Filiz Albrecht, Dr. Christian Fischer, > > Dr. Stefan Hartung, > > Dr. Markus Heyn, Harald Kröger, Rolf Najork > > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
