Do BeanUtils.describe and BeanUtils.populate supposed to handle indexed properties?

Suppose I have this JavaBean:

public class NameBean {
        private String[] name;

        public String[] getName() {
                return this.name;
        }
        public void setName(String[] name) {
                this.name = name;
        }
        public String getName(int index) {
                return this.name[index];
        }
        public void setName(int index, String name) {
                this.name[index] = name;
        }
}

I would expect the following code to return a Map containing: name[0]="John", 
name[1]="Paul", name[2]="Jack"
but instead, I get name="John".
Only the first element is considered.

...
        NameBean nameBean = new NameBean();
        nameBean.setName(new String[] {"John", "Paul", "Jack"});
        
        Map properties = BeanUtils.describe(nameBean);
...


**********************************************************************
Financiere Banque Nationale et NBCN n'assument
aucune responsabilite quant a la confidentialite et l'integrite du
present courriel en raison des risques d'interception inherents 
a l'Internet. Pour cette raison, toute opinion exprimee au terme 
des presentes ne reflete pas necessairement celle de 
Financiere Banque Nationale et de NBCN.
**********************************************************************
Due to the security risks involved in sending information over the
Internet, National Bank Financial  and NBCN cannot be held responsible 
for ensuring the confidentiality and integrity of the present e-mail. For this 
reason, the opinions expressed herein do not necessarily reflect those of 
National Bank Financial and NBCN.
**********************************************************************


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

Reply via email to