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

This commit is contained in:
Juergen Hoeller
2010-07-26 20:55:14 +00:00
parent 3c0ce48cbd
commit d4f73c1d3d
2 changed files with 4 additions and 4 deletions

View File

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

View File

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