Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The following code in DateField is causing exceptions for me:
/**
- Return the field Date value, or null if value was empty or a parsing
- error occured.
* - @return the field Date value
*/
public Date getDate() {
if (value != null || value.length() > 0) {
try { Date date = getDateFormat().parse(value); return new Date( date.getTime()); }catch (ParseException pe)
{ return null; }
} else
{ return null; }}
The first line is causing a NPE if value = null.... the || should be a && ???