struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Van Wart <>
Subject Re: Accepting multiple date masks with the "date" validator
Date Thu, 03 Aug 2006 19:05:41 GMT
Adam Gordon wrote:
> Heh.  Regular Expressions aren't for everyone - I happen to work w/ 
> two engineers who live and die by them.
> In your bean setter for the date, I'd make sure no exceptions could be 
> thrown, or handle them - the code I took over from an engineer we had 
> that left had this issue and it took me almost a week to track down 
> what was going on between the validator and his code.
Yeah, essentially I'm covering all the bases (null pointers, index out 
of bounds, etc.) so no RuntimeExceptions can be thrown either.  If 
anything doesn't look right to the translation method, it simply returns 
the original.  I DO like regular expressions, but feel that a lot of 
people go overboard and use them for things they shouldn't be used for :).

- Scott

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message