You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Matthias Kerkhoff <ma...@BESToffers.de> on 2000/11/12 15:57:11 UTC

PropertyUtils.getPropertyType() vs. PropertyUtils.getPropertyDescriptor()

The javadoc description of PropertyUtils.getPropertyType() states:

    "This method follows the same name resolution rules used by
     getPropertyDescriptor(), so if the last element of a name
     reference is indexed, the type of the property itself will
     be returned."                     ^^^^^^^^^^^^^^^^^^^

and the description of getPropertyDescriptor() in the same class

    "This method resolves indexed and nested property references
     in the same manner as other methods in this class, except
     if the last (or only) name element is indexed, the descriptor
     for the property itself is returned."
         ^^^^^^^^^^^^^^^^^^^

The descriptions are (at least) misleading, because the same term
"the property itsself" is used in an ambiguious way.
Once it stands for the descriptor of the _array_ (in
getPropertyDescriptor) and the other time for the _element_ type
(in getPropertyType).

Could someone please update the description(s) to better reflect
what they're actually returning ?

-- 
Matthias                          mailto:make@BESToffers.de