mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
cleanup regarding to core StringUtils (#15786)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
parent
9ce74b264c
commit
468a245ab8
@ -29,7 +29,6 @@ import java.util.Base64;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
@ -621,17 +620,6 @@ public class MyQAccountHandler extends BaseBridgeHandler implements AccessTokenR
|
|||||||
return oAuthService;
|
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() {
|
private String generateCodeVerifier() {
|
||||||
SecureRandom secureRandom = new SecureRandom();
|
SecureRandom secureRandom = new SecureRandom();
|
||||||
byte[] codeVerifier = new byte[32];
|
byte[] codeVerifier = new byte[32];
|
||||||
|
Loading…
Reference in New Issue
Block a user