[ 
https://issues.apache.org/jira/browse/CAMEL-12260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17078991#comment-17078991
 ] 

Pauli Borodulin edited comment on CAMEL-12260 at 4/9/20, 7:10 AM:
------------------------------------------------------------------

This fix is backwards incompatible and the change was something very different 
than the problem I reported. The change may cause a lot of problems for Camel 
users when upgrading.

Before the change the default value for Strings was {{null}}, which was ok. The 
problem I stumbled upon was that setting {{defaultValue = ""}} in binding 
annotation did not change the default value to empty string, but the default 
value remained {{null}}.

Now the default value has been changed to empty string and there seems to be no 
way of making it {{null}} again. This means a lot of changes to the existing 
implementations using Camel!


was (Author: boro):
This fix is backwards incompatible and the change was something very different 
than the problem I reported. The change may cause a lot of problems for Camel 
users when upgrading.

Before the default value for Strings was "null", which was ok. The problem I 
stumbled upon was that setting defaultValue = "" in binding annotation did not 
change the default value to empty string, but the default value remained null.

Now the default value has been changed to empty string and there seems to be no 
way of making it null again.

> Default value for String field results in null for CSV / Bindy
> --------------------------------------------------------------
>
>                 Key: CAMEL-12260
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12260
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>    Affects Versions: 2.20.2
>            Reporter: Pauli Borodulin
>            Assignee: Dmitry Volodin
>            Priority: Minor
>             Fix For: 2.21.0
>
>
> **CAMEL-5018 added "support the set the default value on the field of bindy 
> CVS", which is nice, but the default value is useless for Strings, because 
> BindyCSVFactory turns the empty value to null even when defaultValue = "", see
> [https://github.com/apache/camel/blob/camel-2.20.x/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java#L230]
> and
> [https://github.com/apache/camel/blob/camel-2.20.x/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyAbstractFactory.java#L234]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to