Fix ExtendedBeanInfo indexed write method edge case

See comments at ExtendedBeanInfo#reproSpr8522

Issue: SPR-8522
This commit is contained in:
Chris Beams
2011-08-29 05:31:47 +00:00
parent 2fc78fb8fd
commit 71984b8038
2 changed files with 31 additions and 1 deletions

View File

@@ -227,7 +227,9 @@ public class ExtendedBeanInfo implements BeanInfo {
}
// update the existing descriptor's indexed read method
try {
existingIPD.setIndexedReadMethod(indexedReadMethod);
if (indexedReadMethod != null) {
existingIPD.setIndexedReadMethod(indexedReadMethod);
}
} catch (IntrospectionException ex) {
// there is a conflicting indexed setter method present -> null it out and try again
existingIPD.setIndexedWriteMethod(null);