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
​

Reply via email to