On Mon, 20 Jan 2003, usha rani wrote:

> Date: Mon, 20 Jan 2003 15:11:33 +0800
> From: usha rani <[EMAIL PROTECTED]>
> Reply-To: Jakarta Commons Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: copyproperties
>
> Hi
>
> i am getting the following error
>
> my classes are
>
> public class OrigBean {
>     ...
>     public String getApplydate();
>     public void setApplydate(String applydate);
>     ...
>   }
>
>   public class DestBean {
>     ...
>     public int getApplydate();
>     public void setApplydate(java.sql.Date applydate);
>     ...
>   }
>

Your DestBean violates JavaBeans requirements for properties.  The data
type returned by the getter has to match the data type of the setter
parameter.  The JDK will think that DestBean does not have an "applydate"
property at all, which will certainly lead to problems.

It's also not legal to have two setApplydate() methods with different data
types (even though such overloading is legal from a Java perspective).

Craig




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to