diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java b/org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java index 3070a3ea069..53537457ea3 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java @@ -40,7 +40,6 @@ public class ConverterNotFoundException extends ConversionException { this.targetType = targetType; } - /** * Returns the source type that was requested to convert from. */ diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java b/org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java index 127930eff12..ddaa6e4e4af 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java +++ b/org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java @@ -42,7 +42,6 @@ public class TypeDescriptor { */ public static final TypeDescriptor NULL = new TypeDescriptor(); - private Class> type; private MethodParameter methodParameter; @@ -51,7 +50,6 @@ public class TypeDescriptor { private Annotation[] cachedFieldAnnotations; - /** * Create a new descriptor for the given type. *
Use this constructor when a conversion point comes from a source such as a Map @@ -90,7 +88,6 @@ public class TypeDescriptor { private TypeDescriptor() { } - /** * Return the wrapped MethodParameter, if any. *
Note: Either MethodParameter or Field is available. @@ -132,8 +129,8 @@ public class TypeDescriptor { * Determine the declared type of the wrapped parameter/field. * Returns the Object wrapper type if the underlying type is a primitive. */ - public Class getObjectType() { - Class type = getType(); + public Class> getObjectType() { + Class> type = getType(); return type != null ? ClassUtils.resolvePrimitiveIfNecessary(type) : type; } @@ -336,8 +333,7 @@ public class TypeDescriptor { * @param type the class * @return the type descriptor */ - public static TypeDescriptor valueOf(Class type) { - // TODO needs a cache for common type descriptors + public static TypeDescriptor valueOf(Class> type) { return (type != null ? new TypeDescriptor(type) : NULL); }