--- a/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Fri Jul 27 22:39:44 2012 -0700
+++ b/jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java Mon Jul 30 13:35:10 2012 +0400
@@ -181,20 +181,21 @@
// the Indexed readMethod was explicitly set to null.
return null;
}
+ String nextMethodName = Introspector.GET_PREFIX + getBaseName();
if (indexedReadMethodName == null) {
Class<?> type = getIndexedPropertyType0();
if (type == boolean.class || type == null) {
indexedReadMethodName = Introspector.IS_PREFIX + getBaseName();
} else {
- indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
+ indexedReadMethodName = nextMethodName;
}
}
Class<?>[] args = { int.class };
indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
- if (indexedReadMethod == null) {
+ if ((indexedReadMethod == null) && !indexedReadMethodName.equals(nextMethodName)) {
// no "is" method, so look for a "get" method.
- indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
+ indexedReadMethodName = nextMethodName;
indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
}
setIndexedReadMethod0(indexedReadMethod);