Skip to content

Commit 7cf538c

Browse files
frommeyercjzheaux
authored andcommitted
Replace StringUtils from oauth2-oidc-sdk
SecurityMockServerConfigurers.java previously used the StringUtils from the optional oauth2-oidc-sdk dependency. Replacing this with the StringUtils from the spring framework this should not force adding the dependency in cases where it is not actually used. Closes gh-9923
1 parent b6ae112 commit 7cf538c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/src/main/java/org/springframework/security/test/web/reactive/server/SecurityMockServerConfigurers.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,7 +29,6 @@
2929
import java.util.function.Supplier;
3030
import java.util.stream.Collectors;
3131

32-
import com.nimbusds.oauth2.sdk.util.StringUtils;
3332
import reactor.core.publisher.Mono;
3433

3534
import org.springframework.core.convert.converter.Converter;
@@ -74,6 +73,7 @@
7473
import org.springframework.test.web.reactive.server.WebTestClient;
7574
import org.springframework.test.web.reactive.server.WebTestClientConfigurer;
7675
import org.springframework.util.Assert;
76+
import org.springframework.util.StringUtils;
7777
import org.springframework.web.server.ServerWebExchange;
7878
import org.springframework.web.server.WebFilter;
7979
import org.springframework.web.server.WebFilterChain;
@@ -648,7 +648,7 @@ private Collection<GrantedAuthority> defaultAuthorities() {
648648
return getAuthorities((Collection) scope);
649649
}
650650
String scopes = scope.toString();
651-
if (StringUtils.isBlank(scopes)) {
651+
if (!StringUtils.hasText(scopes)) {
652652
return Collections.emptyList();
653653
}
654654
return getAuthorities(Arrays.asList(scopes.split(" ")));

0 commit comments

Comments
 (0)