Fixed regression with fallback for non-resolvable property type
This commit is contained in:
@@ -628,7 +628,7 @@ public final class ResolvableType implements Serializable {
|
||||
* Resolve this type to a {@link java.lang.Class}, returning the specified
|
||||
* {@code fallback} if the type cannot be resolved. This method will consider bounds
|
||||
* of {@link TypeVariable}s and {@link WildcardType}s if direct resolution fails;
|
||||
* however, bounds of Object.class will be ignored.
|
||||
* however, bounds of {@code Object.class} will be ignored.
|
||||
* @param fallback the fallback class to use if resolution fails (may be {@code null})
|
||||
* @return the resolved {@link Class} or the {@code fallback}
|
||||
* @see #resolve()
|
||||
|
||||
@@ -105,7 +105,7 @@ public class TypeDescriptor implements Serializable {
|
||||
public TypeDescriptor(Property property) {
|
||||
Assert.notNull(property, "Property must not be null");
|
||||
this.resolvableType = ResolvableType.forMethodParameter(property.getMethodParameter());
|
||||
this.type = this.resolvableType.resolve(Object.class);
|
||||
this.type = this.resolvableType.resolve(property.getType());
|
||||
this.annotations = nullSafeAnnotations(property.getAnnotations());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user