You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Lucian Chirita (JIRA)" <ji...@apache.org> on 2008/02/15 16:58:08 UTC

[jira] Created: (BEANUTILS-306) LocaleConvertUtilsBean.convert throws NPE on null Locale when debug logging is enabled

LocaleConvertUtilsBean.convert throws NPE on null Locale when debug logging is enabled
--------------------------------------------------------------------------------------

                 Key: BEANUTILS-306
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-306
             Project: Commons BeanUtils
          Issue Type: Bug
          Components: Locale BeanUtils / Converters
    Affects Versions: 1.8.0-BETA, 1.7.0
            Reporter: Lucian Chirita
            Priority: Minor


LocaleConvertUtilsBean.convert(String value, Class clazz, Locale locale, String pattern) generally works with a null Locale argument, as the lookup(Locale locale) method checks whether the argument is null and uses the default locale in that case.

However, if debug logging is enabled for LocaleConvertUtils, the method throws NullPointerException on null locale because the debug message does locale.toString().

The same thing happens with the convert(String values[], Class clazz, Locale locale, String pattern) method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BEANUTILS-306) LocaleConvertUtilsBean.convert throws NPE on null Locale when debug logging is enabled

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEANUTILS-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton resolved BEANUTILS-306.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.8.0
         Assignee: Niall Pemberton

Fixed thanks!

http://svn.apache.org/viewvc?view=rev&revision=628158

> LocaleConvertUtilsBean.convert throws NPE on null Locale when debug logging is enabled
> --------------------------------------------------------------------------------------
>
>                 Key: BEANUTILS-306
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-306
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Locale BeanUtils / Converters
>    Affects Versions: 1.7.0, 1.8.0-BETA
>            Reporter: Lucian Chirita
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 1.8.0
>
>
> LocaleConvertUtilsBean.convert(String value, Class clazz, Locale locale, String pattern) generally works with a null Locale argument, as the lookup(Locale locale) method checks whether the argument is null and uses the default locale in that case.
> However, if debug logging is enabled for LocaleConvertUtils, the method throws NullPointerException on null locale because the debug message does locale.toString().
> The same thing happens with the convert(String values[], Class clazz, Locale locale, String pattern) method.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.