提交 5458a427 编写于 作者: J Juergen Hoeller

Polishing

上级 01868096
......@@ -47,8 +47,7 @@ import org.springframework.util.StringUtils;
*/
public final class Property {
private static Map<Property, Annotation[]> annotationCache =
new ConcurrentReferenceHashMap<>();
private static Map<Property, Annotation[]> annotationCache = new ConcurrentReferenceHashMap<>();
private final Class<?> objectType;
......@@ -72,7 +71,7 @@ public final class Property {
this.readMethod = readMethod;
this.writeMethod = writeMethod;
this.methodParameter = resolveMethodParameter();
this.name = (name == null ? resolveName() : name);
this.name = (name != null ? name : resolveName());
}
......
......@@ -108,8 +108,7 @@ public abstract class AbstractNamedValueMethodArgumentResolver implements Handle
}
if (!ClassUtils.isAssignableValue(parameter.getParameterType(), arg)) {
arg = this.conversionService.convert(
arg, TypeDescriptor.valueOf(arg.getClass()), new TypeDescriptor(parameter));
arg = this.conversionService.convert(arg, TypeDescriptor.forObject(arg), new TypeDescriptor(parameter));
}
handleResolvedValue(arg, namedValueInfo.name, parameter, message);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册