Updates for org.apache.commons.lang3.RandomStringUtils deprecations

This commit is contained in:
Chris Eager
2024-11-14 15:52:42 -06:00
committed by Chris Eager
parent 93f4a91ebf
commit ecbb2f1399
18 changed files with 53 additions and 53 deletions

View File

@@ -37,7 +37,7 @@ import org.whispersystems.textsecuregcm.tests.util.SynchronousExecutorService;
class APNSenderTest {
private static final String DESTINATION_DEVICE_TOKEN = RandomStringUtils.randomAlphanumeric(32);
private static final String DESTINATION_DEVICE_TOKEN = RandomStringUtils.secure().nextAlphanumeric(32);
private static final String BUNDLE_ID = "org.signal.test";
private Account destinationAccount;

View File

@@ -128,7 +128,7 @@ class MessageSenderTest {
return MessageProtos.Envelope.newBuilder()
.setClientTimestamp(System.currentTimeMillis())
.setServerTimestamp(System.currentTimeMillis())
.setContent(ByteString.copyFromUtf8(RandomStringUtils.randomAlphanumeric(256)))
.setContent(ByteString.copyFromUtf8(RandomStringUtils.secure().nextAlphanumeric(256)))
.setType(MessageProtos.Envelope.Type.CIPHERTEXT)
.setServerGuid(UUID.randomUUID().toString())
.build();

View File

@@ -55,7 +55,7 @@ class PushNotificationSchedulerTest {
private static final UUID ACCOUNT_UUID = UUID.randomUUID();
private static final String ACCOUNT_NUMBER = "+18005551234";
private static final byte DEVICE_ID = 1;
private static final String APN_ID = RandomStringUtils.randomAlphanumeric(32);
private static final String APN_ID = RandomStringUtils.secure().nextAlphanumeric(32);
@BeforeEach
void setUp() throws Exception {