commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject RE: [beanutils] not finding the setter
Date Wed, 02 Jul 2003 16:39:40 GMT
Kenneth wrote:
> I've been running into a problem that appears to be in how beanutils
> is dealing with information returned from java.beans.Introspector.
> I've created a bean that is similar to the following:
> public class SampleBean {
>     private String bound;
>     public void setBound(String bound) { this.bound = bound; }
>     public String getBound() { return bound; }
>     public boolean isBound() { return Utils.toBoolean(bound); } }
> Have I missed something?

Yes, your class does not comply with the JavaBeans specification.  You can't
have both 'is' and 'get' methods, pick one or the other to go with your
'set' method (and the types will have to match).
See section 8.3 Design Patterns for Properties

Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University, PA, IRM 

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