File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
web/src/main/java/org/springframework/security/web Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 37
37
import org .apache .commons .logging .LogFactory ;
38
38
39
39
import org .springframework .core .log .LogMessage ;
40
+ import org .springframework .util .StringUtils ;
40
41
41
42
/**
42
43
* A {@link org.springframework.security.web.FilterChainProxy.FilterChainDecorator} that
@@ -519,8 +520,8 @@ public KeyValues getLowCardinalityKeyValues(FilterChainObservationContext contex
519
520
return KeyValues .of (CHAIN_SIZE_NAME , String .valueOf (context .getChainSize ()))
520
521
.and (CHAIN_POSITION_NAME , String .valueOf (context .getChainPosition ()))
521
522
.and (FILTER_SECTION_NAME , context .getFilterSection ())
522
- .and (FILTER_NAME , (context .getFilterName () != null && ! context .getFilterName (). isEmpty () )
523
- ? context . getFilterName () : KeyValue .NONE_VALUE );
523
+ .and (FILTER_NAME , (StringUtils . hasText ( context .getFilterName ())) ? context .getFilterName ()
524
+ : KeyValue .NONE_VALUE );
524
525
}
525
526
526
527
@ Override
Original file line number Diff line number Diff line change 34
34
35
35
import org .springframework .lang .Nullable ;
36
36
import org .springframework .util .Assert ;
37
+ import org .springframework .util .StringUtils ;
37
38
import org .springframework .web .server .ServerWebExchange ;
38
39
import org .springframework .web .server .WebFilter ;
39
40
import org .springframework .web .server .WebFilterChain ;
@@ -689,8 +690,8 @@ public KeyValues getLowCardinalityKeyValues(WebFilterChainObservationContext con
689
690
return KeyValues .of (CHAIN_SIZE_NAME , String .valueOf (context .getChainSize ()))
690
691
.and (CHAIN_POSITION_NAME , String .valueOf (context .getChainPosition ()))
691
692
.and (FILTER_SECTION_NAME , context .getFilterSection ())
692
- .and (FILTER_NAME , (context .getFilterName () != null && ! context .getFilterName (). isEmpty () )
693
- ? context . getFilterName () : KeyValue .NONE_VALUE );
693
+ .and (FILTER_NAME , (StringUtils . hasText ( context .getFilterName ())) ? context .getFilterName ()
694
+ : KeyValue .NONE_VALUE );
694
695
}
695
696
696
697
@ Override
You can’t perform that action at this time.
0 commit comments