faster check for empty string

This commit is contained in:
JhonDoe15 2023-10-05 20:18:22 +03:00
parent 15d773dc6e
commit 8448625453

View file

@ -16,7 +16,7 @@ public class CustomWebFilter implements WebFilter {
final String path = exchange.getRequest().getPath().pathWithinApplication().value();
if (path.startsWith("/ui") || path.equals("") || path.equals("/")) {
if (path.startsWith("/ui") || path.isEmpty() || path.equals("/")) {
return chain.filter(
exchange.mutate().request(
exchange.getRequest().mutate()
@ -29,4 +29,4 @@ public class CustomWebFilter implements WebFilter {
return chain.filter(exchange);
}
}
}