Friday, June 1, 2012

Avoiding BeanUtils ConversionException When Date is Null

You'll need to override the default Date converter to one which accept null defaults:

Date defaultDate = null;
DateConverter converter = new DateConverter(defaultValue);
ConvertUtils.register(converter, Date.class);

Reference: http://www.mail-archive.com/user@commons.apache.org/msg02246.html

No comments:

Post a Comment