> -----Original Message----- > From: Erik Hatcher [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 26, 2003 4:11 AM > To: [EMAIL PROTECTED] > Subject: Re: [Xdoclet-user] strutsvalidatorxml for commons-validator > > > On Tuesday, November 25, 2003, at 02:02 PM, Mark Lybarger wrote: > > Great. I also added support for java.util.Date since that > seemed to > > be out, via: > > > > static { > > supportedTypes.add("java.lang.String"); > > supportedTypes.add("java.lang.Integer"); > > supportedTypes.add("int"); > > supportedTypes.add("java.lang.Float"); > > supportedTypes.add("float"); > > supportedTypes.add("java.lang.Long"); > > supportedTypes.add("long"); > > supportedTypes.add("java.lang.Double"); > > supportedTypes.add("double"); > > supportedTypes.add("java.lang.Boolean"); > > supportedTypes.add("boolean"); > > supportedTypes.add("java.util.Date"); > > supportedTypes.add("date"); > > } > > > > None of the existing test cases broke, so I assume it all > still works > > ok ;) > > I don't believe there are any test cases for this code. But, I spot > something wrong already. "date" is not a type. All the > others in that > list are primitives or wrapper classes (or java.lang.String). So, > "date" should be removed. Good catch!
> > If you're using Validator in a non-Struts environment, does this list > of supported types even make sense anyway? Possibly not. I have a dto which has a date field. While implementing the use of the strutsvalidatorxml, I noticed that the date field wasn't getting put into the generated validation.xml even though it had valid markup in the class file. This lead me to find that the strutsvalidatorxml code only looks at a field if it's a "supported" type. Adding java.util.Date seemed like the easiest way to get my file generated correctly. > > Erik > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.532 / Virus Database: 326 - Release Date: 10/27/2003 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.532 / Virus Database: 326 - Release Date: 10/27/2003 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
