Browse Source

turned TypeDescriptor.UNKNOWN into an internal detail (SPR-7349)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3507 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Juergen Hoeller 16 years ago
parent
commit
9fa2883ef7
  1. 2
      org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java
  2. 6
      org.springframework.core/src/main/java/org/springframework/core/convert/support/PropertyTypeDescriptor.java

2
org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java

@ -43,7 +43,7 @@ public class TypeDescriptor { @@ -43,7 +43,7 @@ public class TypeDescriptor {
public static final TypeDescriptor NULL = new TypeDescriptor();
/** Constant defining a TypeDescriptor for 'unknown type' */
public static final TypeDescriptor UNKNOWN = new TypeDescriptor(Object.class);
private static final TypeDescriptor UNKNOWN = new TypeDescriptor(Object.class);
private static final Map<Class<?>, TypeDescriptor> typeDescriptorCache = new HashMap<Class<?>, TypeDescriptor>();

6
org.springframework.core/src/main/java/org/springframework/core/convert/support/PropertyTypeDescriptor.java

@ -118,11 +118,11 @@ public class PropertyTypeDescriptor extends TypeDescriptor { @@ -118,11 +118,11 @@ public class PropertyTypeDescriptor extends TypeDescriptor {
}
public TypeDescriptor forElementType(Class<?> elementType) {
if (elementType == null) {
return TypeDescriptor.UNKNOWN;
if (elementType != null) {
return new PropertyTypeDescriptor(this.propertyDescriptor, getMethodParameter(), elementType);
}
else {
return new PropertyTypeDescriptor(this.propertyDescriptor, getMethodParameter(), elementType);
return super.forElementType(null);
}
}

Loading…
Cancel
Save