turned TypeDescriptor.UNKNOWN into an internal detail (SPR-7349)
This commit is contained in:
@@ -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>();
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user