From 468a245ab8f222bf308ec85988da9be458a5a460 Mon Sep 17 00:00:00 2001 From: lsiepel Date: Sat, 21 Oct 2023 11:48:38 +0200 Subject: [PATCH] cleanup regarding to core StringUtils (#15786) Signed-off-by: Leo Siepel --- .../myq/internal/handler/MyQAccountHandler.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/bundles/org.openhab.binding.myq/src/main/java/org/openhab/binding/myq/internal/handler/MyQAccountHandler.java b/bundles/org.openhab.binding.myq/src/main/java/org/openhab/binding/myq/internal/handler/MyQAccountHandler.java index 0e8cccf0b7f..1911c733756 100644 --- a/bundles/org.openhab.binding.myq/src/main/java/org/openhab/binding/myq/internal/handler/MyQAccountHandler.java +++ b/bundles/org.openhab.binding.myq/src/main/java/org/openhab/binding/myq/internal/handler/MyQAccountHandler.java @@ -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];