Hi,
I've recently tried out new 2.17.0 version from 2.16.1 and discovered a bug
with named parameters and null values in SQL component.
I use CamelSqlQuery header to set the query with named parameters as ":?param".
Values for that parameters are stored in message body (map).
Problem occurs when such map contains a NULL value for key "param" - camel
throws exception "Cannot find key [param] in message body or headers...".
When value is not null - everything working as expected. Looking at
DefaultSqlPrepareStatementStrategy class (at Github) it's quite obvious - when
"lookupParameter" (line 267) function returns null (even if key exists, but
value is null!) next check (line 271) throwing error. Which I suppose is not
correct behavior.