--- a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Sun Sep 26 14:14:48 2010 -0700
+++ b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Mon Sep 27 13:38:49 2010 +0400
@@ -189,11 +189,13 @@
indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
}
}
- indexedReadMethod = Introspector.findInstanceMethod(cls, indexedReadMethodName, int.class);
+
+ Class[] args = { int.class };
+ indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
if (indexedReadMethod == null) {
// no "is" method, so look for a "get" method.
indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
- indexedReadMethod = Introspector.findInstanceMethod(cls, indexedReadMethodName, int.class);
+ indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
}
setIndexedReadMethod0(indexedReadMethod);
}
@@ -265,7 +267,9 @@
if (indexedWriteMethodName == null) {
indexedWriteMethodName = Introspector.SET_PREFIX + getBaseName();
}
- indexedWriteMethod = Introspector.findInstanceMethod(cls, indexedWriteMethodName, int.class, type);
+
+ Class[] args = (type == null) ? null : new Class[] { int.class, type };
+ indexedWriteMethod = Introspector.findMethod(cls, indexedWriteMethodName, 2, args);
if (indexedWriteMethod != null) {
if (!indexedWriteMethod.getReturnType().equals(void.class)) {
indexedWriteMethod = null;