added initial support for handling unknown nested type values when converting collections; now favor factory method for constructing nested type descriptors for clarity (made constructor private); improved javadoc
This commit is contained in:
@@ -236,7 +236,7 @@ public class ReflectionHelper {
|
||||
TypeDescriptor targetType;
|
||||
if (varargsPosition != null && argPosition >= varargsPosition) {
|
||||
MethodParameter methodParam = MethodParameter.forMethodOrConstructor(methodOrCtor, varargsPosition);
|
||||
targetType = new TypeDescriptor(methodParam.getParameterType().getComponentType(), methodParam);
|
||||
targetType = TypeDescriptor.forNestedType(methodParam.getParameterType().getComponentType(), methodParam);
|
||||
}
|
||||
else {
|
||||
targetType = new TypeDescriptor(MethodParameter.forMethodOrConstructor(methodOrCtor, argPosition));
|
||||
@@ -268,7 +268,7 @@ public class ReflectionHelper {
|
||||
TypeDescriptor targetType;
|
||||
if (varargsPosition != null && argPosition >= varargsPosition) {
|
||||
MethodParameter methodParam = new MethodParameter(method, varargsPosition);
|
||||
targetType = new TypeDescriptor(methodParam.getParameterType().getComponentType(), methodParam);
|
||||
targetType = TypeDescriptor.forNestedType(methodParam.getParameterType().getComponentType(), methodParam);
|
||||
}
|
||||
else {
|
||||
targetType = new TypeDescriptor(new MethodParameter(method, argPosition));
|
||||
|
||||
Reference in New Issue
Block a user