DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28358>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28358 Problems on indexed property with JDK 1.4 ------- Additional Comments From [EMAIL PROTECTED] 2004-05-17 20:40 ------- Whoops; I attached too soon, but I still can't reproduce the problem. I will upload an extended test class which uses PropertyUtils.getIndexedProperty. public static void main(String[] args) throws Exception { PropertyUtilsTestBean bean = new PropertyUtilsTestBean(); PropertyDescriptor pd = PropertyUtils.getPropertyDescriptor(bean, "stringList"); System.out.println("pd for stringList: " + pd); pd = PropertyUtils.getPropertyDescriptor(bean, "stringArray"); System.out.println("pd for stringArray: " + pd); String[] testArray = new String[] { "zero", "one", "two" }; bean.setStringArray(testArray); ArrayList testList = new ArrayList(); for (int i = 0; i < testArray.length; i++) { testList.add(testArray[i]); } bean.setStringList(testList); for (int i = 0; i < testArray.length; i++) { System.out.println("from accessor: stringArray[" + i + "]: " + bean.getStringArray(i)); System.out.println("from getIndexedProperty: stringArray[" + i + "]: " + PropertyUtils.getIndexedProperty(bean, "stringArray", i)); System.out.println("from accessor: stringList[" + i + "]: " + bean.getStringList(i)); System.out.println("from getIndexedProperty: stringList[" + i + "]: " + PropertyUtils.getIndexedProperty(bean, "stringList", i)); } } results: % java PropertyUtilsTestBean pd for stringList: [EMAIL PROTECTED] pd for stringArray: [EMAIL PROTECTED] from accessor: stringArray[0]: zero from getIndexedProperty: stringArray[0]: zero from accessor: stringList[0]: zero from getIndexedProperty: stringList[0]: zero from accessor: stringArray[1]: one from getIndexedProperty: stringArray[1]: one from accessor: stringList[1]: one from getIndexedProperty: stringList[1]: one from accessor: stringArray[2]: two from getIndexedProperty: stringArray[2]: two from accessor: stringList[2]: two from getIndexedProperty: stringList[2]: two --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
