commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9868] - BeanUtils.populate() throws IllegalArgumentException when setting indexed property as array.
Date Mon, 17 Jun 2002 13:21:27 GMT
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=9868>.
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=9868

BeanUtils.populate() throws IllegalArgumentException when setting indexed property as array.

jerome.jacobsen@gentootech.com changed:

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



------- Additional Comments From jerome.jacobsen@gentootech.com  2002-06-17 13:21 -------
Please see section 8.3.3 of the JavaBeans API Specification 1.01 (especially 
the last sentence).

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
8.3.3 Indexed properties
If we find a property whose type is an array "<PropertyElement>[]", then we 
also look for methods of the form:

public <PropertyElement> get<PropertyName>(int a);
public void set<PropertyName>(int a, <PropertyElement> b);

If we find either kind of pattern then we assume that "<propertyName>" is an 
indexed property and that these methods can be used to read and/or write an 
indexed value.

Thus an indexed property "foo" might be represented by four accessor methods:

public Bah[] getFoo();
public void setFoo(Bah a[]);
public Bah getFoo(int a);
public void setFoo(int a, Bah b);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

As you can see overloading of indexed accessors in the above way is legal 
according to the specification.

--
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