Sorry, I find your explanation confusing and it took me a while to work out
what the problem was - so I'm going to re-state it to (hopefully) make it
BaseLocaleConverter has a number of constructors which can be divided into
A) protected constructors with a default value
B) protected constructors without a default value
C) a private constructor
All the protected constructors end all calling the private constructor with a
"useDefault" parameter. The protected constructors WITH a "default value"
parameter call the private constructor with a "useDefault" value of "true". The
protected constructors WITHOUT a "default value" parameter call the private
constructor with a "useDefault" value of "false". The "useDefault" variable is
used to determine whether to throw a ConversionException or return a default
value when a conversion error occurs.
DecimalLocaleConverter was changed on 4th Feb 2004 (revision 128763) so that
the constructor WITHOUT a default value that used to call the appropriate
(super) constructor in BaseLocaleConveter instead called a constructor in
itself with a default value of null. Effectively this means that
DecimalLocaleConverter and all its siblings will always have a "useDefault"
setting of "true" and never throw a ConversionException, but always return a
Correcting this will have a big impact because the following classes inherit
All these classes will start throwing ConversionExceptions where they never did
in the past.
Correcting the error is very simple - however it causes quite a few of the test
cases to fail (they were added after this bug, which is why it wasn't picked
Attaching a patch indicating change required - I don't have time to fix the
test cases at the moment.