commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Natarajan, Nagarajan (Consultant)" <Nagarajan.Natara...@GTECH.com>
Subject [commons-beanutils]BeanUtils.copyProperties() does not copy Boolean properties
Date Fri, 21 Jan 2005 18:25:43 GMT
Hi,
  I have a bean which has accessor and mutator methods for Boolean type
object.
 
    public void setUpdateObject(Boolean value) {
      this.booleanValue = value;
    }
    public Boolean getUpdateObject() {
      return this.booleanValue;
    }
 
When I do a BeanUtils.copyProperties(bean2, bean1) to copy values in
bean1 into
bean2, the Boolean object values does not get copied in to the second
bean. 
 
        DataBean bean1 = new DataBean();
        setInputValues(bean1);
        DataBean bean2 = new DataBean();
        BeanUtils.copyProperties(bean2,bean1);
 
When I tried with primitive boolean attribute it works fine. It also
works fine for Integer
object, but I don't know why it is not working for objects of type
Boolean. 
 
Please do inform whether copyProperties() supports copying objects of
type Boolean. 
Anticipating your response.
 
Thanks and Regards,
Nagarajan.B.N
 
 



-----------------------------------------
This email may contain confidential and privileged material for the sole
use of the intended recipient(s). Any review, use, retention, distribution
or disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact the
sender by reply email and delete all copies of this message. Also, email is
susceptible to data corruption, interception, tampering, unauthorized
amendment and viruses. We only send and receive emails on the basis that we
are not liable for any such corruption, interception, tampering, amendment
or viruses or any consequence thereof.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message