You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Lucian Chirita <da...@gmail.com> on 2008/02/15 14:39:02 UTC

[BEANUTILS] LocaleConvertUtilsBean convert method with null locale

Is the LocaleConvertUtilsBean.convert(String value, Class clazz, Locale 
locale, String pattern) method supposed to accept null Locale arguments?

This generally works, as the locale is used to resolve a converter, and 
the lookup(Locale locale) method checks whether the argument is null and 
uses the default locale in this case.

However, when debug statements are enabled for LocaleConvertUtilsBean, 
the convert methods fails with NullPointerException on null Locale as 
the debug statement does locale.toString().

Could this inconsistency be considered a bug?

Thanks,
Lucian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [BEANUTILS] LocaleConvertUtilsBean convert method with null locale

Posted by Lucian Chirita <da...@gmail.com>.
Niall Pemberton wrote:
> Yes please file a bug report in JIRA:
>
> http://commons.apache.org/beanutils/issue-tracking.html
>
> Thanks
>
> Niall
>   

I've logged BEANUTILS-306: 
http://issues.apache.org/jira/browse/BEANUTILS-306

Thank you,
Lucian

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [BEANUTILS] LocaleConvertUtilsBean convert method with null locale

Posted by Niall Pemberton <ni...@gmail.com>.
On Fri, Feb 15, 2008 at 1:39 PM, Lucian Chirita <da...@gmail.com> wrote:
> Is the LocaleConvertUtilsBean.convert(String value, Class clazz, Locale
>  locale, String pattern) method supposed to accept null Locale arguments?
>
>  This generally works, as the locale is used to resolve a converter, and
>  the lookup(Locale locale) method checks whether the argument is null and
>  uses the default locale in this case.
>
>  However, when debug statements are enabled for LocaleConvertUtilsBean,
>  the convert methods fails with NullPointerException on null Locale as
>  the debug statement does locale.toString().
>
>  Could this inconsistency be considered a bug?

Yes please file a bug report in JIRA:

http://commons.apache.org/beanutils/issue-tracking.html

Thanks

Niall

>  Thanks,
>  Lucian
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org