DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15519>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15519

PropertyUtils.getPropertyType() for java.util.Collection

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WONTFIX



------- Additional Comments From [EMAIL PROTECTED]  2002-12-23 19:17 -------
The reason this works for arrays is that the type of each element is *required*
to be the same.  If you have a Collection that has mixed types in it, the return
value from getPropertyType() for any particular element would only reflect the
type of that element -- which would be misleading to users who then assume that
this is the only type of property value supported.

As a workaround, your code can certainly ascertain the type of the element
itself quite easily:

  // Bean that has a Collection property named "coll"
  Object mybean = ...;
  Object value = PropertyUtils.getProperty(mybean, "coll[3]");
  Class clazz = value.getClass();

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

Reply via email to