Skip to content

Commit 1d48f31

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 a108868 commit 1d48f31

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.context.ApplicationContext;
@@ -82,6 +81,7 @@
8281
import org.springframework.test.web.reactive.server.WebTestClientConfigurer;
8382
import org.springframework.util.Assert;
8483
import org.springframework.util.ClassUtils;
84+
import org.springframework.util.StringUtils;
8585
import org.springframework.web.reactive.result.method.HandlerMethodArgumentResolver;
8686
import org.springframework.web.reactive.result.method.annotation.ArgumentResolverConfigurer;
8787
import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter;
@@ -663,7 +663,7 @@ private Collection<GrantedAuthority> defaultAuthorities() {
663663
return getAuthorities((Collection) scope);
664664
}
665665
String scopes = scope.toString();
666-
if (StringUtils.isBlank(scopes)) {
666+
if (!StringUtils.hasText(scopes)) {
667667
return Collections.emptyList();
668668
}
669669
return getAuthorities(Arrays.asList(scopes.split(" ")));

0 commit comments

Comments
 (0)