From 42403a37c3fcf159bdc574a7200396825d55fecf Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Fri, 7 Jan 2011 02:51:56 +0000 Subject: [PATCH] getPropertyTypeDescriptor implementation optimization --- .../java/org/springframework/beans/BeanWrapperImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org.springframework.beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java b/org.springframework.beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java index 42e69c358f..6e503472e3 100644 --- a/org.springframework.beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java +++ b/org.springframework.beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java @@ -364,9 +364,10 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra public TypeDescriptor getPropertyTypeDescriptor(String propertyName) throws BeansException { try { - BeanWrapper nestedBw = getNestedBeanWrapper(propertyName); - PropertyTokenHolder tokens = getPropertyNameTokens(getFinalPath(nestedBw, propertyName)); - PropertyDescriptor pd = getPropertyDescriptorInternal(tokens.actualName); + BeanWrapperImpl nestedBw = getBeanWrapperForPropertyPath(propertyName); + String finalPath = getFinalPath(nestedBw, propertyName); + PropertyTokenHolder tokens = getPropertyNameTokens(finalPath); + PropertyDescriptor pd = nestedBw.getCachedIntrospectionResults().getPropertyDescriptor(tokens.actualName); if (pd != null) { if (tokens.keys != null) { if (pd.getReadMethod() != null) {