You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/07/07 16:35:20 UTC

DO NOT REPLY [Bug 29772] - DateLocaleConverter does NOT return a default value if a conversion error occurs

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29772>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29772

DateLocaleConverter does NOT return a default value if a conversion error occurs

niallp@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|DateLocaleConverter does NOT|DateLocaleConverter does NOT
                   |return a default value if a |return a default value if a
                   |conversion error occurs     |conversion error occurs



------- Additional Comments From niallp@apache.org  2004-07-07 14:35 -------
When I look at source code for BaseLocaleConverter it looks fine to me. Is this 
an issue for you if you try the current nightly build? There has been a couple 
of changes since Version 1.6.1:
  1) DateLocaleConverter now uses a "default" date format if none is specified
  2) BaseLocaleConverter now returns null if the defaultValue is null and the 
value passed to the convert method, rather than throwing a ConversionException.

I don't really understand what you mean when you say "...the boolean Default is 
set to false ...". When I look at BaseLocaleConverter the "useDefault" property 
has the comment "Should we return the default value on conversion errors?" and 
although it has no setter method, the constructors in BaseLocaleConverter set 
this value - look at the "private" constructor which is called by all its other 
constructors.

Can you provide more information on the constructor you are using for 
DateLocaleConverter, the values you are passing to the constructor and the 
values you are passing to convert() method. Also can you say what type of 
Exception you are talking about and the message with that exception (or even 
better the stack trace).

Thanks

Niall

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