diff --git a/src/main/java/org/apache/commons/dbutils/BeanProcessor.java b/src/main/java/org/apache/commons/dbutils/BeanProcessor.java index 26610a0b1..54b1532ca 100644 --- a/src/main/java/org/apache/commons/dbutils/BeanProcessor.java +++ b/src/main/java/org/apache/commons/dbutils/BeanProcessor.java @@ -19,6 +19,7 @@ import org.apache.commons.dbutils.annotations.Column; import java.beans.BeanInfo; +import java.beans.IndexedPropertyDescriptor; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; @@ -262,7 +263,12 @@ private T populateBean(final ResultSet rs, final T bean, } final PropertyDescriptor prop = props[columnToProperty[i]]; - final Class propType = prop.getPropertyType(); + Class propType; + if (prop instanceof IndexedPropertyDescriptor) { + propType = ((IndexedPropertyDescriptor) prop).getIndexedPropertyType(); + } else { + propType = prop.getPropertyType(); + } Object value = null; if (propType != null) {