commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <>
Subject Re: [BeanUtils] Handling array creation?
Date Thu, 08 Sep 2005 21:08:01 GMT
Ahh my mistake, I used the LazyDynaBean code for most of what I posted and
assumed PropertyUtils.getPropertyType() returned the type for the property
(array) rather than the arrays components. I find PropertyUtils behaving
that way surprising and non-intuitve.


----- Original Message ----- 
From: "Frank W. Zammetti" <>
Sent: Thursday, September 08, 2005 8:44 PM

> I believe I found the problem... it looks like the line:
> Class componentType = type.getComponentType();
> superfluous because the value that is needed is gotten by the call
> to PropertyUtils.getPropertyType().
> What I'm seeing is that PropertyUtils.getPropertyType() returns "class
> java.lang.String", which is exactly what I expect.  If I then call
> isArray() on that returned Class object, if comes up false.  Then, trying
> to call getComponentType() on that Class returns null, which breaks
> everything after it.  So, just taking that line out seems to make it work
> as expected.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message