R
Rahul
Hi all,
I am having a problem in using copyProperties() of
org.apache.commons.beanutils.BeanUtils class
I am doing it in this way
BeanUtils.copyProperties(destBean,srcBean)
where destBean and srcBean both have a property by name date,
which is of type java.sql.Timestamp()
If date property of srcBean is set to null then the above statement
gives
an exception: "BeanUtil.ConversionException: No value specified"
It works fine in case srcBean.date is properly initialized.
But there is a possibility of having null in srcBean.date in my code.
So, how to deal with this?
I am having a problem in using copyProperties() of
org.apache.commons.beanutils.BeanUtils class
I am doing it in this way
BeanUtils.copyProperties(destBean,srcBean)
where destBean and srcBean both have a property by name date,
which is of type java.sql.Timestamp()
If date property of srcBean is set to null then the above statement
gives
an exception: "BeanUtil.ConversionException: No value specified"
It works fine in case srcBean.date is properly initialized.
But there is a possibility of having null in srcBean.date in my code.
So, how to deal with this?