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

Justyna Kubica-Ledzion commented on BEANUTILS-550:
--------------------------------------------------

Hi, I’ve prepared PR for this issue: 
[https://github.com/apache/commons-beanutils/pull/106].

Assignment of default value in StringConverter didn’t work as method 
_getDefault(final_ *__* _Class<?> type),_ only for String.class, returned null 
instead of default value. I’ve changed this method to return default value also 
for String.class.

Could you please review and let me know if this modification is OK?
I would appreciate any feedback.

Justyna

> Converting null in to String is always null
> -------------------------------------------
>
>                 Key: BEANUTILS-550
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-550
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: ConvertUtils &amp; Converters
>    Affects Versions: 1.9.4
>            Reporter: Alessandro
>            Priority: Major
>
> Even if the defaultValue property of StringConverter is set to a non-null 
> value, the conversion process always responds with a null.
> The clue is in the getDefault method of the AbstractConverter class which, in 
> case the request is to convert a null to a String, returns null



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to