commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lucian Chirita <dad...@gmail.com>
Subject [BEANUTILS] LocaleConvertUtilsBean convert method with null locale
Date Fri, 15 Feb 2008 13:39:02 GMT
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


Mime
View raw message