cleanup regarding to core StringUtils (#15786)

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
lsiepel 2023-10-21 11:48:38 +02:00 committed by GitHub
parent 9ce74b264c
commit 468a245ab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,6 @@ import java.util.Base64;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
@ -621,17 +620,6 @@ public class MyQAccountHandler extends BaseBridgeHandler implements AccessTokenR
return oAuthService;
}
private static String randomString(int length) {
int low = 97; // a-z
int high = 122; // A-Z
StringBuilder sb = new StringBuilder(length);
Random random = new Random();
for (int i = 0; i < length; i++) {
sb.append((char) (low + (int) (random.nextFloat() * (high - low + 1))));
}
return sb.toString();
}
private String generateCodeVerifier() {
SecureRandom secureRandom = new SecureRandom();
byte[] codeVerifier = new byte[32];