commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32122] - Is there any way in Betwixt to validate the timestamp?
Date Thu, 18 Nov 2004 22:35:20 GMT
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=32122>.
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=32122


rdonkin@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         OS/Version|                            |All
         Resolution|                            |WORKSFORME




------- Additional Comments From rdonkin@apache.org  2004-11-18 23:35 -------
Hi James

This is the behaviour I would expect. Betwixt (by default) uses BeanUtils for conversions.
BeanUtils (by 
default) uses Timestamp.valueOf. This is very liberal. Try:

System.out.println(Timestamp.valueOf("2004-11-32 00:00:00.0"));

and you'll see what I mean!

What the best way to get the validation you need would be to create a custom ObjectStringConverter

(see the documentation on the website) which overrides the default and performs a different

conversion, one which fails when non-calendar entries are passed in. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message