--- a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Tue Jun 15 21:32:59 2010 +0400
+++ b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Tue Jun 22 12:06:33 2010 +0400
@@ -189,16 +189,11 @@
indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
}
}
-
- Class[] args = { int.class };
-
- indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName,
- 1, args);
+ indexedReadMethod = Introspector.findInstanceMethod(cls, indexedReadMethodName, int.class);
if (indexedReadMethod == null) {
// no "is" method, so look for a "get" method.
indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
- indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName,
- 1, args);
+ indexedReadMethod = Introspector.findInstanceMethod(cls, indexedReadMethodName, int.class);
}
setIndexedReadMethod0(indexedReadMethod);
}
@@ -270,8 +265,7 @@
if (indexedWriteMethodName == null) {
indexedWriteMethodName = Introspector.SET_PREFIX + getBaseName();
}
- indexedWriteMethod = Introspector.findMethod(cls, indexedWriteMethodName,
- 2, (type == null) ? null : new Class[] { int.class, type });
+ indexedWriteMethod = Introspector.findInstanceMethod(cls, indexedWriteMethodName, int.class, type);
if (indexedWriteMethod != null) {
if (!indexedWriteMethod.getReturnType().equals(void.class)) {
indexedWriteMethod = null;