Polishing

This commit is contained in:
Juergen Hoeller
2019-07-31 23:34:41 +02:00
parent c14d2d37d4
commit 5b9129724b
4 changed files with 21 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -431,6 +431,7 @@ public enum HttpStatus {
* Whether this status code is in the HTTP series
* {@link org.springframework.http.HttpStatus.Series#INFORMATIONAL}.
* This is a shortcut for checking the value of {@link #series()}.
* @since 4.0
* @see #series()
*/
public boolean is1xxInformational() {
@@ -441,6 +442,7 @@ public enum HttpStatus {
* Whether this status code is in the HTTP series
* {@link org.springframework.http.HttpStatus.Series#SUCCESSFUL}.
* This is a shortcut for checking the value of {@link #series()}.
* @since 4.0
* @see #series()
*/
public boolean is2xxSuccessful() {
@@ -451,6 +453,7 @@ public enum HttpStatus {
* Whether this status code is in the HTTP series
* {@link org.springframework.http.HttpStatus.Series#REDIRECTION}.
* This is a shortcut for checking the value of {@link #series()}.
* @since 4.0
* @see #series()
*/
public boolean is3xxRedirection() {
@@ -461,6 +464,7 @@ public enum HttpStatus {
* Whether this status code is in the HTTP series
* {@link org.springframework.http.HttpStatus.Series#CLIENT_ERROR}.
* This is a shortcut for checking the value of {@link #series()}.
* @since 4.0
* @see #series()
*/
public boolean is4xxClientError() {
@@ -471,6 +475,7 @@ public enum HttpStatus {
* Whether this status code is in the HTTP series
* {@link org.springframework.http.HttpStatus.Series#SERVER_ERROR}.
* This is a shortcut for checking the value of {@link #series()}.
* @since 4.0
* @see #series()
*/
public boolean is5xxServerError() {

View File

@@ -106,10 +106,9 @@ public class HandlerMethodArgumentResolverComposite implements HandlerMethodArgu
/**
* Iterate over registered
* {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers} and
* invoke the one that supports it.
* @throws IllegalStateException if no suitable
* {@link HandlerMethodArgumentResolver} is found.
* {@link HandlerMethodArgumentResolver HandlerMethodArgumentResolvers}
* and invoke the one that supports it.
* @throws IllegalArgumentException if no suitable argument resolver is found
*/
@Override
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
@@ -130,9 +129,9 @@ public class HandlerMethodArgumentResolverComposite implements HandlerMethodArgu
private HandlerMethodArgumentResolver getArgumentResolver(MethodParameter parameter) {
HandlerMethodArgumentResolver result = this.argumentResolverCache.get(parameter);
if (result == null) {
for (HandlerMethodArgumentResolver methodArgumentResolver : this.argumentResolvers) {
if (methodArgumentResolver.supportsParameter(parameter)) {
result = methodArgumentResolver;
for (HandlerMethodArgumentResolver resolver : this.argumentResolvers) {
if (resolver.supportsParameter(parameter)) {
result = resolver;
this.argumentResolverCache.put(parameter, result);
break;
}