commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: BeanUtils
Date Sun, 21 Apr 2002 02:53:13 GMT
Underneath it all, BeanUtils uses the JDK's java.beans.Introspector class
to recognize valid properties (and their getter and setter method names),
so the behavior will definitely be affected by any differences in how the
various JVMs do this.  However, a very common source of difficulties is to
do what you are doing -- overload the set method with multiple different
argument types.  This is not valid according to the JavaBeans
specification, and causes at least some (most?) JVMs to ignore that
property because it does not match the correct naming pattern.

Craig


On Wed, 17 Apr 2002, Tim Sawyer wrote:

> Date: Wed, 17 Apr 2002 21:57:15 +0100
> From: Tim Sawyer <tsawyer@nildram.co.uk>
> Reply-To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
> To: commons-dev@jakarta.apache.org
> Subject: BeanUtils
>
> Hello.
>
> I'm trying to use BeanUtils to get a value from a Boolean property on a
> bean.  There are three set methods, which take boolean, Boolean and String
> parameters, and there is a get method which returns a Boolean.  (We did have
> an is method for the Boolean, but as far as I can tell, is should only be
> used for booleans.)
>
> Anyway, we're seeing different behaviour and wondered if anyone had come
> across this before, or if it's something we've done wrong.
>
> WinNT/JDK 1.3.1/Struts/Orion 1.5.2 App Server
> 	- everything works fine
>
> Solaris/JDK 1.2.2/Struts/Orion 1.5.2 App Server
> 	- The BeanUtils can't see our get and set methods.
>
> Where it doesn't work, we can fix it by changing the Booleans to strings,
> but that's rather messy.  I think I tried JDK1.2.2 on WinNT too, and that
> worked, but I'm not entirely sure now.
>
> Any thoughts?  We're going to try JDK 1.3.1 on Solaris tomorrow...
>
> Tim.
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message