diff options
author | Matteo Mara <matteo.mara@sonarsource.com> | 2024-10-07 18:13:33 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-10-14 20:03:03 +0000 |
commit | 1ad3667d30dd82213ae47bea2c267188f003b2c7 (patch) | |
tree | 422f1f66b48114de0e79de9f7bd53aceff3f7c91 /server/sonar-auth-common | |
parent | ce2e686a3e269f937ffb51635928cd1a597b2d07 (diff) | |
download | sonarqube-1ad3667d30dd82213ae47bea2c267188f003b2c7.tar.gz sonarqube-1ad3667d30dd82213ae47bea2c267188f003b2c7.zip |
NO-JIRA Stop using deprecated methods from RandomStringUtils
Diffstat (limited to 'server/sonar-auth-common')
-rw-r--r-- | server/sonar-auth-common/src/test/java/org/sonar/auth/OAuthRestClientTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-auth-common/src/test/java/org/sonar/auth/OAuthRestClientTest.java b/server/sonar-auth-common/src/test/java/org/sonar/auth/OAuthRestClientTest.java index 76b95efbf19..8a03ce7762c 100644 --- a/server/sonar-auth-common/src/test/java/org/sonar/auth/OAuthRestClientTest.java +++ b/server/sonar-auth-common/src/test/java/org/sonar/auth/OAuthRestClientTest.java @@ -34,7 +34,7 @@ import org.junit.Rule; import org.junit.Test; import static java.lang.String.format; -import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric; +import static org.apache.commons.lang3.RandomStringUtils.secure; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.Mockito.mock; @@ -61,7 +61,7 @@ public class OAuthRestClientTest { @Test public void execute_request() throws IOException { - String body = randomAlphanumeric(10); + String body = secure().nextAlphanumeric(10); mockWebServer.enqueue(new MockResponse().setBody(body)); Response response = executeRequest(serverUrl + "/test", oAuth20Service, auth2AccessToken); |