camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sharpe <>
Subject Referring to non-existent enum in simple expression results in null instead of error
Date Wed, 27 Jul 2016 19:52:40 GMT
Hi everyone,

In the Camel documentation for the simple expression language
<> I learned that I can refer to enums.
I used this to pass an enum to some bean in my route. Here is a snippet of
Java DSL:

    .bean(SomeBean.class, "process(*,

This works, but I discovered that if SOME_ENUM does not exist, then
receives "null" as an input parameter.

This surprised me. I expected there to be some sort of simple expression
interpreter error, "Cannot find SOME_ENUM" or something like that. Is there
some way I can enforce that the enum value must exist? I've added a null
check to my bean, but I'm surprised it's necessary.

Does this sound like a bug?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message