Polish
See gh-14667
This commit is contained in:
committed by
Stephane Nicoll
parent
b4a8ad06de
commit
335775892b
@@ -128,10 +128,11 @@ public final class WebFluxTags {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@code outcome} tag based on the response status of the given
|
||||
* Creates an {@code outcome} tag based on the response status of the given
|
||||
* {@code exchange}.
|
||||
* @param exchange the exchange
|
||||
* @return the outcome tag derived from the response status
|
||||
* @since 2.1.0
|
||||
*/
|
||||
public static Tag outcome(ServerWebExchange exchange) {
|
||||
HttpStatus status = exchange.getResponse().getStatusCode();
|
||||
|
||||
@@ -165,9 +165,10 @@ public final class WebMvcTags {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@code outcome} tag based on the status of the given {@code response}.
|
||||
* Creates an {@code outcome} tag based on the status of the given {@code response}.
|
||||
* @param response the HTTP response
|
||||
* @return the outcome tag derived from the status of the response
|
||||
* @since 2.1.0
|
||||
*/
|
||||
public static Tag outcome(HttpServletResponse response) {
|
||||
if (response != null) {
|
||||
@@ -181,7 +182,7 @@ public final class WebMvcTags {
|
||||
if (status < 400) {
|
||||
return OUTCOME_REDIRECTION;
|
||||
}
|
||||
else if (status < 500) {
|
||||
if (status < 500) {
|
||||
return OUTCOME_CLIENT_ERROR;
|
||||
}
|
||||
return OUTCOME_SERVER_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user