Skip to content

Commit 4475c67

Browse files
committed
Fix checkstyle violation
1 parent 195f3f0 commit 4475c67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-web/src/main/java/org/springframework/web/filter/reactive/ForwardedHeaderFilter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
* where "Forwarded" and "X-Forwarded-*" headers are eliminated, and not used.
4040
*
4141
* @author Arjen Poutsma
42+
* @author Rossen Stoyanchev
4243
* @since 5.0
4344
* @see <a href="https://tools.ietf.org/html/rfc7239">https://tools.ietf.org/html/rfc7239</a>
4445
*/
@@ -71,7 +72,6 @@ public void setRemoveOnly(boolean removeOnly) {
7172

7273
@Override
7374
public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
74-
7575
ServerHttpRequest request = exchange.getRequest();
7676
if (!hasForwardedHeaders(request)) {
7777
return chain.filter(exchange);
@@ -117,8 +117,8 @@ private static String getForwardedPrefix(ServerHttpRequest request) {
117117
int endIndex = prefix.length();
118118
while (endIndex > 1 && prefix.charAt(endIndex - 1) == '/') {
119119
endIndex--;
120-
};
121-
prefix = endIndex != prefix.length() ? prefix.substring(0, endIndex) : prefix;
120+
}
121+
prefix = (endIndex != prefix.length() ? prefix.substring(0, endIndex) : prefix);
122122
}
123123
return prefix;
124124
}

0 commit comments

Comments
 (0)