camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DariusX <>
Subject camel-bindy : DefaultValue of Empty String, for a string field
Date Sat, 09 Jul 2016 20:55:27 GMT
This relates to camel-bindy
Currently, there does not appear to be a way to specify that a String field
should have an empty-string by default. The default must either be a
non-empty sting or a null. 
However, one can specify a null as a default by simply not specifying a
So if a default value is explicitly specified to be an empty string
@DataField(defaultValue="")  for a string field, it seems right to assume
the programmer wanted an empty string, rather than a null.
I guess my question is whether the returning of a null is by conscious
design, or if this is something that is open to change.
I know that 2.18 allows a custom BindyConverter that can achieve this. That
will work, but seems a bit heavy-handed.
My first post here. Thanks.

View this message in context:
Sent from the Camel Development mailing list archive at

View raw message