getPropertyTypeDescriptor bug fixes

This commit is contained in:
Keith Donald
2011-01-06 23:12:00 +00:00
parent 4c9731d572
commit e254521952
2 changed files with 3 additions and 4 deletions

View File

@@ -364,8 +364,9 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException {
try {
PropertyTokenHolder tokens = getPropertyNameTokens(propertyName);
PropertyDescriptor pd = getPropertyDescriptorInternal(tokens.actualName);
BeanWrapper nestedBw = getNestedBeanWrapper(propertyName);
PropertyTokenHolder tokens = getPropertyNameTokens(getFinalPath(nestedBw, propertyName));
PropertyDescriptor pd = getPropertyDescriptorInternal(tokens.actualName);
if (pd != null) {
if (tokens.keys != null) {
if (pd.getReadMethod() != null) {

View File

@@ -102,8 +102,6 @@ public class TypeDescriptorTests {
assertTrue(typeDescriptor.isArray());
assertEquals(List.class,typeDescriptor.getElementType());
assertEquals(String.class, typeDescriptor.getElementTypeDescriptor().getElementType());
// TODO asc notice that the type of the list elements is lost: typeDescriptor.getElementType() should return a TypeDescriptor
assertEquals("java.util.List[]",typeDescriptor.asString());
}