Browse Source

polish

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1915 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Keith Donald 17 years ago
parent
commit
e4c356bd19
  1. 1
      org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java
  2. 10
      org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java

1
org.springframework.core/src/main/java/org/springframework/core/convert/ConverterNotFoundException.java

@ -40,7 +40,6 @@ public class ConverterNotFoundException extends ConversionException { @@ -40,7 +40,6 @@ public class ConverterNotFoundException extends ConversionException {
this.targetType = targetType;
}
/**
* Returns the source type that was requested to convert from.
*/

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

@ -42,7 +42,6 @@ public class TypeDescriptor { @@ -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 { @@ -51,7 +50,6 @@ public class TypeDescriptor {
private Annotation[] cachedFieldAnnotations;
/**
* Create a new descriptor for the given type.
* <p>Use this constructor when a conversion point comes from a source such as a Map
@ -90,7 +88,6 @@ public class TypeDescriptor { @@ -90,7 +88,6 @@ public class TypeDescriptor {
private TypeDescriptor() {
}
/**
* Return the wrapped MethodParameter, if any.
* <p>Note: Either MethodParameter or Field is available.
@ -132,8 +129,8 @@ public class TypeDescriptor { @@ -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 { @@ -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);
}

Loading…
Cancel
Save