mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-03-09 06:50:05 +00:00
Polish
Use StringUtils#hasText PR gh-13179
This commit is contained in:
parent
af233a2a00
commit
4c5bf3bdf5
@ -37,6 +37,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.core.log.LogMessage;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* A {@link org.springframework.security.web.FilterChainProxy.FilterChainDecorator} that
|
||||
@ -519,8 +520,8 @@ public final class ObservationFilterChainDecorator implements FilterChainProxy.F
|
||||
return KeyValues.of(CHAIN_SIZE_NAME, String.valueOf(context.getChainSize()))
|
||||
.and(CHAIN_POSITION_NAME, String.valueOf(context.getChainPosition()))
|
||||
.and(FILTER_SECTION_NAME, context.getFilterSection())
|
||||
.and(FILTER_NAME, (context.getFilterName() != null && !context.getFilterName().isEmpty())
|
||||
? context.getFilterName() : KeyValue.NONE_VALUE);
|
||||
.and(FILTER_NAME, (StringUtils.hasText(context.getFilterName())) ? context.getFilterName()
|
||||
: KeyValue.NONE_VALUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -34,6 +34,7 @@ import reactor.core.publisher.Mono;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
import org.springframework.web.server.WebFilter;
|
||||
import org.springframework.web.server.WebFilterChain;
|
||||
@ -689,8 +690,8 @@ public final class ObservationWebFilterChainDecorator implements WebFilterChainP
|
||||
return KeyValues.of(CHAIN_SIZE_NAME, String.valueOf(context.getChainSize()))
|
||||
.and(CHAIN_POSITION_NAME, String.valueOf(context.getChainPosition()))
|
||||
.and(FILTER_SECTION_NAME, context.getFilterSection())
|
||||
.and(FILTER_NAME, (context.getFilterName() != null && !context.getFilterName().isEmpty())
|
||||
? context.getFilterName() : KeyValue.NONE_VALUE);
|
||||
.and(FILTER_NAME, (StringUtils.hasText(context.getFilterName())) ? context.getFilterName()
|
||||
: KeyValue.NONE_VALUE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user