http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-84

> If an invalid date text is submitted the attribute will
> get the current date, while a null value is more appropriate.

> The problem is in the DateFormatter constructor where the
> "date" variable is initialized to "new Date()"

While I see how this could be an issue, setDate does through an
IllegalArgumentException if the date was invalid.

Here's why date should be assigned to new Date(). This way, I can do:

dateFormatter.setFormat(someDateFormatString);
dateFormatter.getFormattedDate();

To get the current date in a particular format. To compromise, I think the
catch(ParseException e) block (in webwork.util.DateFormatter) should set
this.date = null; So if an attempt to set the date is made and fails, then
you'll get back null.

Any complaints? If not, will someone do this and close the ticket?

--Erik



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to