#831 - Polishing.

This commit is contained in:
Greg Turnquist
2019-03-11 17:16:01 -05:00
parent bdd602aa74
commit 520fdc8d91
10 changed files with 15 additions and 13 deletions

View File

@@ -38,7 +38,7 @@ public class UriTemplateFactory {
* @param mapping must not be {@literal null} or empty.
* @return
*/
public static UriTemplate templateFor(String mapping) {
public static UriTemplate templateFor(@Nullable String mapping) {
Assert.hasText(mapping, "Mapping must not be null or empty!");

View File

@@ -320,7 +320,7 @@ public class WebHandler {
* @param attribute must not be {@literal null}.
* @return
*/
protected BoundMethodParameter createParameter(MethodParameter parameter, Object value,
protected BoundMethodParameter createParameter(MethodParameter parameter, @Nullable Object value,
AnnotationAttribute attribute) {
return new BoundMethodParameter(parameter, value, attribute);
}
@@ -370,7 +370,7 @@ public class WebHandler {
* @param value can be {@literal null}.
* @param attribute can be {@literal null}.
*/
public BoundMethodParameter(MethodParameter parameter, Object value, AnnotationAttribute attribute) {
public BoundMethodParameter(MethodParameter parameter, @Nullable Object value, AnnotationAttribute attribute) {
Assert.notNull(parameter, "MethodParameter must not be null!");
@@ -404,6 +404,7 @@ public class WebHandler {
*
* @return
*/
@Nullable
public Object getValue() {
return value;
}

View File

@@ -293,8 +293,8 @@ public class RepresentationModelProcessorInvoker {
* Returns whether the given {@link EntityModel} matches the given target {@link ResolvableType}. We inspect the
* {@link EntityModel}'s value to determine the match.
*
* @param resource
* @param target must not be {@literal null}.
* @param resource can be {@literal null}.
* @param target can be {@literal null}.
* @return whether the given {@link EntityModel} can be assigned to the given target {@link ResolvableType}
*/
private static boolean isValueTypeMatch(@Nullable EntityModel<?> resource, @Nullable ResolvableType target) {