This is an automated email from the ASF dual-hosted git repository.

apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 84a3115ef61a Replace deprecated RandomStringUtils.randomAlphabetic
84a3115ef61a is described below

commit 84a3115ef61a8dedc8c46ea120babac399d2d5dc
Author: AurĂ©lien Pupier <[email protected]>
AuthorDate: Fri May 29 15:32:54 2026 +0200

    Replace deprecated RandomStringUtils.randomAlphabetic
    
    Beware that it is the one from commons lang3 which is deprecated. There
    is another one from azure which is not deprecated
    
    Signed-off-by: AurĂ©lien Pupier <[email protected]>
---
 .../cosmosdb/integration/CosmosDbConsumerIT.java   |  6 +++---
 .../cosmosdb/integration/CosmosDbProducerIT.java   | 22 +++++++++++-----------
 .../operations/CosmosDbClientOperationsIT.java     |  6 +++---
 .../operations/CosmosDbContainerOperationsIT.java  |  6 +++---
 .../operations/CosmosDbDatabaseOperationsIT.java   |  8 ++++----
 .../eventhubs/integration/EventHubsConsumerIT.java |  6 +++---
 .../eventhubs/integration/EventHubsProducerIT.java |  4 ++--
 .../eventhubs/integration/EventProcessorIT.java    |  2 +-
 .../azure/storage/blob/integration/Base.java       |  2 +-
 .../integration/BlobChangeFeedOperationsIT.java    |  2 +-
 .../blob/integration/BlobConsumerDeleteMoveIT.java | 12 ++++++------
 .../storage/blob/integration/BlobConsumerIT.java   | 11 +++++------
 .../blob/integration/BlobFindBlobsByTagsIT.java    |  2 +-
 .../storage/blob/integration/BlobOperationsIT.java |  2 +-
 .../storage/blob/integration/BlobProducerIT.java   | 10 +++++-----
 .../blob/integration/BlobSnapshotOperationsIT.java |  2 +-
 .../azure/storage/datalake/integration/Base.java   |  2 +-
 .../datalake/integration/DataLakeConsumerIT.java   | 10 +++++-----
 .../integration/DataLakeFileOperationIT.java       |  2 +-
 .../datalake/integration/DataLakeProducerIT.java   |  2 +-
 .../queue/integration/StorageQueueBase.java        |  2 +-
 .../operations/integration/QueueOperationsIT.java  |  6 +++---
 .../integration/QueueServiceOperationsIT.java      |  6 +++---
 .../apache/camel/component/dhis2/Dhis2PutIT.java   |  2 +-
 24 files changed, 67 insertions(+), 68 deletions(-)

diff --git 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/CosmosDbConsumerIT.java
 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/CosmosDbConsumerIT.java
index ab4bdd3308ae..1c5cd4962088 100644
--- 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/CosmosDbConsumerIT.java
+++ 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/CosmosDbConsumerIT.java
@@ -40,9 +40,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 })
 class CosmosDbConsumerIT extends BaseCamelCosmosDbTestSupport {
 
-    private static final String DATABASE_NAME = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
-    private String containerName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
-    private String leaseDatabaseName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+    private static final String DATABASE_NAME = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
+    private String containerName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
+    private String leaseDatabaseName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
     @BeforeEach
     void createDatabaseContainerAndItems() {
diff --git 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/CosmosDbProducerIT.java
 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/CosmosDbProducerIT.java
index 743658654a23..c028a12dc4a6 100644
--- 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/CosmosDbProducerIT.java
+++ 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/CosmosDbProducerIT.java
@@ -67,7 +67,7 @@ public class CosmosDbProducerIT extends 
BaseCamelCosmosDbTestSupport {
     void testListDatabases() throws InterruptedException {
 
         // create bunch of databases
-        final String prefixDatabaseNames = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String prefixDatabaseNames = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
         final int expectedSize = 5;
 
         for (int i = 0; i < expectedSize; i++) {
@@ -97,7 +97,7 @@ public class CosmosDbProducerIT extends 
BaseCamelCosmosDbTestSupport {
 
     @Test
     void testCreateAndDeleteDatabase() throws InterruptedException {
-        final String databaseNames = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String databaseNames = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
         // test create database
         result.expectedMessageCount(1);
@@ -133,8 +133,8 @@ public class CosmosDbProducerIT extends 
BaseCamelCosmosDbTestSupport {
 
     @Test
     void testCreateAndDeleteContainer() throws InterruptedException {
-        final String databaseName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
-        final String containerName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String databaseName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
+        final String containerName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
         // test if we disable flag create database if not existing, we should 
get exchange exception
         result.expectedMessageCount(1);
@@ -192,7 +192,7 @@ public class CosmosDbProducerIT extends 
BaseCamelCosmosDbTestSupport {
 
     @Test
     void testReplaceDatabaseThroughput() throws InterruptedException {
-        final String databaseName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String databaseName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
         client.createDatabaseIfNotExists(databaseName, 
ThroughputProperties.createManualThroughput(500)).block();
 
@@ -216,8 +216,8 @@ public class CosmosDbProducerIT extends 
BaseCamelCosmosDbTestSupport {
     @Test
     void testQueryContainers() throws InterruptedException {
         // create bunch of containers to test
-        final String prefixContainerNames = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
-        final String databaseName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String prefixContainerNames = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
+        final String databaseName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
         final int expectedSize = 5;
 
         client.createDatabaseIfNotExists(databaseName).block();
@@ -248,8 +248,8 @@ public class CosmosDbProducerIT extends 
BaseCamelCosmosDbTestSupport {
 
     @Test
     void testCreateUpsertReplaceAndDeleteItem() throws InterruptedException {
-        final String containerName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
-        final String databaseName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String containerName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
+        final String databaseName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
         final Map<String, Object> item1 = new HashMap<>();
         item1.put("id", "test-id-1");
@@ -371,8 +371,8 @@ public class CosmosDbProducerIT extends 
BaseCamelCosmosDbTestSupport {
 
     @Test
     void testQueryItems() {
-        final String containerName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
-        final String databaseName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String containerName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
+        final String databaseName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
         // create testing items
         final Map<String, Object> item1 = new HashMap<>();
diff --git 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbClientOperationsIT.java
 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbClientOperationsIT.java
index 5fe02330f6f2..e0a5c125fb26 100644
--- 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbClientOperationsIT.java
+++ 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbClientOperationsIT.java
@@ -72,7 +72,7 @@ class CosmosDbClientOperationsIT {
 
     @Test
     void testCreateDeleteDatabase() {
-        final String databaseName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String databaseName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
         // test create database
         final CosmosDatabaseResponse createdDatabase = 
CosmosDbClientOperations.withClient(clientWrapper)
@@ -99,7 +99,7 @@ class CosmosDbClientOperationsIT {
 
     @Test
     void testGetDatabaseOperations() {
-        final String databaseName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String databaseName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
         // first try to get operations without creating the database
         CosmosDbClientOperations.withClient(clientWrapper)
@@ -123,7 +123,7 @@ class CosmosDbClientOperationsIT {
     @Test
     void testQueryAndReadAllDatabases() {
         // create bunch of databases
-        final String prefixDatabaseNames = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String prefixDatabaseNames = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
         final int expectedSize = 5;
 
         for (int i = 0; i < expectedSize; i++) {
diff --git 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbContainerOperationsIT.java
 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbContainerOperationsIT.java
index b68d214b66bc..3fc43442d95d 100644
--- 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbContainerOperationsIT.java
+++ 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbContainerOperationsIT.java
@@ -58,8 +58,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 })
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 class CosmosDbContainerOperationsIT {
-    private static final String DATABASE_NAME = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
-    private static final String LEASE_DATABASE_NAME = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+    private static final String DATABASE_NAME = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
+    private static final String LEASE_DATABASE_NAME = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
     private CosmosAsyncClientWrapper clientWrapper;
     private CosmosDbContainerOperations containerOperations;
@@ -86,7 +86,7 @@ class CosmosDbContainerOperationsIT {
 
     @BeforeEach
     void prepareFreshContainer() {
-        containerId = RandomStringUtils.randomAlphabetic(5).toLowerCase();
+        containerId = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
 
         containerOperations = 
CosmosDbClientOperations.withClient(clientWrapper)
                 
.createDatabaseIfNotExistAndGetDatabaseOperations(DATABASE_NAME, null)
diff --git 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbDatabaseOperationsIT.java
 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbDatabaseOperationsIT.java
index 4de1bc169270..8ec287aab0a4 100644
--- 
a/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbDatabaseOperationsIT.java
+++ 
b/components/camel-azure/camel-azure-cosmosdb/src/test/java/org/apache/camel/component/azure/cosmosdb/integration/operations/CosmosDbDatabaseOperationsIT.java
@@ -49,7 +49,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 })
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 class CosmosDbDatabaseOperationsIT {
-    private static final String DATABASE_NAME = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+    private static final String DATABASE_NAME = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
     private CosmosAsyncClientWrapper clientWrapper;
     private CosmosDbDatabaseOperations operations;
@@ -78,7 +78,7 @@ class CosmosDbDatabaseOperationsIT {
 
     @Test
     void testCreateDeleteContainer() {
-        final String containerId = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
+        final String containerId = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
 
         // test create container
         final CosmosContainerResponse createdContainer = operations
@@ -105,7 +105,7 @@ class CosmosDbDatabaseOperationsIT {
 
     @Test
     void testGetContainerOperations() {
-        final String containerId = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
+        final String containerId = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
 
         // first try to get operations without creating the container
         operations
@@ -129,7 +129,7 @@ class CosmosDbDatabaseOperationsIT {
     @Test
     void testQueryAndReadAllContainers() {
         // create bunch of containers
-        final String prefixContainerNames = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String prefixContainerNames = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
         final int expectedSize = 5;
 
         for (int i = 0; i < expectedSize; i++) {
diff --git 
a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventHubsConsumerIT.java
 
b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventHubsConsumerIT.java
index a5019b203bb1..209ef537d637 100644
--- 
a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventHubsConsumerIT.java
+++ 
b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventHubsConsumerIT.java
@@ -62,7 +62,7 @@ class EventHubsConsumerIT extends CamelTestSupport {
 
     @BeforeAll
     public void prepare() throws Exception {
-        containerName = RandomStringUtils.randomAlphabetic(5).toLowerCase();
+        containerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
 
         final Properties properties = TestUtils.loadAzureAccessFromJvmEnv();
 
@@ -84,8 +84,8 @@ class EventHubsConsumerIT extends CamelTestSupport {
         final EventHubProducerAsyncClient producerAsyncClient
                 = 
EventHubsClientFactory.createEventHubProducerAsyncClient(configuration);
 
-        final String messageBody = RandomStringUtils.randomAlphabetic(30);
-        final String messageKey = RandomStringUtils.randomAlphabetic(5);
+        final String messageBody = 
RandomStringUtils.secure().nextAlphabetic(30);
+        final String messageKey = RandomStringUtils.secure().nextAlphabetic(5);
 
         producerAsyncClient
                 .send(Collections.singletonList(new EventData(messageBody)), 
new SendOptions().setPartitionKey(messageKey))
diff --git 
a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventHubsProducerIT.java
 
b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventHubsProducerIT.java
index 59ff86733743..cdb2bf232e0d 100644
--- 
a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventHubsProducerIT.java
+++ 
b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventHubsProducerIT.java
@@ -71,7 +71,7 @@ class EventHubsProducerIT extends CamelTestSupport {
     @Test
     public void testSendEventWithSpecificPartition() throws 
InterruptedException {
 
-        final String messageBody = RandomStringUtils.randomAlphabetic(30);
+        final String messageBody = 
RandomStringUtils.secure().nextAlphabetic(30);
         final String firstPartition = "0";
 
         final AtomicBoolean eventExists = new AtomicBoolean();
@@ -106,7 +106,7 @@ class EventHubsProducerIT extends CamelTestSupport {
     @Test
     public void testSendingNonValidData() throws InterruptedException {
 
-        final String messageBody = RandomStringUtils.randomAlphabetic(30);
+        final String messageBody = 
RandomStringUtils.secure().nextAlphabetic(30);
         final String firstPartition = "0";
 
         final AtomicReference<Exchange> resultExchange = new 
AtomicReference<>();
diff --git 
a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventProcessorIT.java
 
b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventProcessorIT.java
index 54a5f001cc7b..3f253cc3e6e9 100644
--- 
a/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventProcessorIT.java
+++ 
b/components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/integration/EventProcessorIT.java
@@ -57,7 +57,7 @@ public class EventProcessorIT {
     @BeforeAll
     public void prepare() throws Exception {
         final Properties properties = TestUtils.loadAzureAccessFromJvmEnv();
-        final String containerName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
+        final String containerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
 
         configuration = new EventHubsConfiguration();
         
configuration.setConnectionString(properties.getProperty("connectionString"));
diff --git 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/Base.java
 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/Base.java
index bf8a48149f1b..83d177815a05 100644
--- 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/Base.java
+++ 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/Base.java
@@ -74,7 +74,7 @@ public class Base extends CamelTestSupport {
 
     @BeforeAll
     public void initProperties() {
-        containerName = RandomStringUtils.randomAlphabetic(5).toLowerCase();
+        containerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
 
         configuration = new BlobConfiguration();
         configuration.setCredentialType(SHARED_KEY_CREDENTIAL);
diff --git 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobChangeFeedOperationsIT.java
 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobChangeFeedOperationsIT.java
index 82b232107042..a7424fcb50f5 100644
--- 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobChangeFeedOperationsIT.java
+++ 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobChangeFeedOperationsIT.java
@@ -64,7 +64,7 @@ class BlobChangeFeedOperationsIT extends Base {
     @Disabled("It is disabled due to changefeed support in the default test 
account")
     void testGetChangeFeed() throws IOException, InterruptedException {
         // create test blobs
-        final String blobName = RandomStringUtils.randomAlphabetic(10);
+        final String blobName = RandomStringUtils.secure().nextAlphabetic(10);
         final String data = "Hello world from my awesome tests!";
         final InputStream dataStream = new 
ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
 
diff --git 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobConsumerDeleteMoveIT.java
 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobConsumerDeleteMoveIT.java
index ff8b6de8dbf2..db9a633fb0c3 100644
--- 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobConsumerDeleteMoveIT.java
+++ 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobConsumerDeleteMoveIT.java
@@ -57,12 +57,12 @@ class BlobConsumerDeleteMoveIT extends Base {
 
     @BeforeAll
     public void setup() {
-        deleteContainerName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
-        moveSourceContainerName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
-        moveDestContainerName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
-        noDeleteContainerName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
-        prefixMoveSourceContainerName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
-        prefixMoveDestContainerName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
+        deleteContainerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
+        moveSourceContainerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
+        moveDestContainerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
+        noDeleteContainerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
+        prefixMoveSourceContainerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
+        prefixMoveDestContainerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
 
         deleteContainerClient = 
serviceClient.getBlobContainerClient(deleteContainerName);
         moveSourceContainerClient = 
serviceClient.getBlobContainerClient(moveSourceContainerName);
diff --git 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobConsumerIT.java
 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobConsumerIT.java
index 489b50db2d1f..d256c60ace73 100644
--- 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobConsumerIT.java
+++ 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobConsumerIT.java
@@ -34,7 +34,6 @@ import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.io.TempDir;
 
-import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -58,10 +57,10 @@ class BlobConsumerIT extends Base {
 
     @BeforeAll
     public void setup() {
-        batchContainerName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
-        prefixContainerName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase();
-        blobName = RandomStringUtils.randomAlphabetic(5);
-        blobName2 = RandomStringUtils.randomAlphabetic(5);
+        batchContainerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
+        prefixContainerName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
+        blobName = RandomStringUtils.secure().nextAlphabetic(5);
+        blobName2 = RandomStringUtils.secure().nextAlphabetic(5);
 
         containerClient = serviceClient.getBlobContainerClient(containerName);
         batchContainerClient = 
serviceClient.getBlobContainerClient(batchContainerName);
@@ -214,7 +213,7 @@ class BlobConsumerIT extends Base {
     }
 
     private String generateRandomBlobName(String prefix, String extension) {
-        return prefix + randomAlphabetic(5).toLowerCase() + "." + extension;
+        return prefix + 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase() + "." + extension;
     }
 
     @AfterAll
diff --git 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobFindBlobsByTagsIT.java
 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobFindBlobsByTagsIT.java
index f227ffea1627..14e49911f03b 100644
--- 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobFindBlobsByTagsIT.java
+++ 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobFindBlobsByTagsIT.java
@@ -49,7 +49,7 @@ class BlobFindBlobsByTagsIT extends Base {
 
     @BeforeAll
     public void setup() throws Exception {
-        randomBlobName = RandomStringUtils.randomAlphabetic(10);
+        randomBlobName = RandomStringUtils.secure().nextAlphabetic(10);
 
         blobServiceClientWrapper = new BlobServiceClientWrapper(serviceClient);
         blobContainerClientWrapper = 
blobServiceClientWrapper.getBlobContainerClientWrapper(configuration.getContainerName());
diff --git 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobOperationsIT.java
 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobOperationsIT.java
index f4f9e42f6109..947c1ee54c02 100644
--- 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobOperationsIT.java
+++ 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobOperationsIT.java
@@ -73,7 +73,7 @@ class BlobOperationsIT extends Base {
 
     @BeforeAll
     public void setup() throws Exception {
-        randomBlobName = RandomStringUtils.randomAlphabetic(10);
+        randomBlobName = RandomStringUtils.secure().nextAlphabetic(10);
 
         blobContainerClientWrapper = new 
BlobServiceClientWrapper(serviceClient)
                 
.getBlobContainerClientWrapper(configuration.getContainerName());
diff --git 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobProducerIT.java
 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobProducerIT.java
index d9a011d35f3a..a5f984525c94 100644
--- 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobProducerIT.java
+++ 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobProducerIT.java
@@ -63,7 +63,7 @@ class BlobProducerIT extends Base {
 
     @Test
     void testUploadBlockBlob() throws InterruptedException {
-        final String blobName = RandomStringUtils.randomAlphabetic(10);
+        final String blobName = RandomStringUtils.secure().nextAlphabetic(10);
 
         result.expectedMessageCount(1);
 
@@ -77,7 +77,7 @@ class BlobProducerIT extends Base {
 
     @Test
     void testCommitAndStageBlockBlob() throws InterruptedException {
-        final String blobName = RandomStringUtils.randomAlphabetic(10);
+        final String blobName = RandomStringUtils.secure().nextAlphabetic(10);
 
         result.expectedMessageCount(1);
 
@@ -102,7 +102,7 @@ class BlobProducerIT extends Base {
 
     @Test
     void testCommitAppendBlobWithError() throws InterruptedException {
-        final String blobName = RandomStringUtils.randomAlphabetic(10);
+        final String blobName = RandomStringUtils.secure().nextAlphabetic(10);
 
         template.send("direct:commitAppendBlobWithError", exchange -> {
             exchange.getIn().setHeader(BlobConstants.BLOB_NAME, blobName);
@@ -122,7 +122,7 @@ class BlobProducerIT extends Base {
 
     @Test
     void testCreateAndUpdateAppendBlob() throws InterruptedException {
-        final String blobName = RandomStringUtils.randomAlphabetic(10);
+        final String blobName = RandomStringUtils.secure().nextAlphabetic(10);
 
         result.expectedMessageCount(1);
 
@@ -145,7 +145,7 @@ class BlobProducerIT extends Base {
 
     @Test
     void testCreateAndUploadPageBlob() throws InterruptedException {
-        final String blobName = RandomStringUtils.randomAlphabetic(10);
+        final String blobName = RandomStringUtils.secure().nextAlphabetic(10);
 
         result.expectedMessageCount(1);
 
diff --git 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobSnapshotOperationsIT.java
 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobSnapshotOperationsIT.java
index 1253bff3e2d6..24fe08510da6 100644
--- 
a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobSnapshotOperationsIT.java
+++ 
b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/BlobSnapshotOperationsIT.java
@@ -144,7 +144,7 @@ class BlobSnapshotOperationsIT extends Base {
 
     private BlobOperations freshBlob() {
         final BlobClientWrapper clientWrapper
-                = 
blobContainerClientWrapper.getBlobClientWrapper(RandomStringUtils.randomAlphabetic(10));
+                = 
blobContainerClientWrapper.getBlobClientWrapper(RandomStringUtils.secure().nextAlphabetic(10));
         return new BlobOperations(configuration, clientWrapper);
     }
 
diff --git 
a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/Base.java
 
b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/Base.java
index 743ec3d053f4..9a54e6ad671e 100644
--- 
a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/Base.java
+++ 
b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/Base.java
@@ -71,7 +71,7 @@ public class Base extends CamelTestSupport {
 
     @BeforeAll
     void initProperties() {
-        fileSystemName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT);
+        fileSystemName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase(Locale.ROOT);
 
         configuration = new DataLakeConfiguration();
         configuration.setSharedKeyCredential(new StorageSharedKeyCredential(
diff --git 
a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
 
b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
index a19ec13a3838..a80530a65091 100644
--- 
a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
+++ 
b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeConsumerIT.java
@@ -71,10 +71,10 @@ public class DataLakeConsumerIT extends Base {
 
     @BeforeAll
     public void setup() {
-        batchFileSystemName = 
RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT);
-        batchFileSystemName1 = 
RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT);
-        batchFileSystemName2 = 
RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT);
-        fileName = RandomStringUtils.randomAlphabetic(5);
+        batchFileSystemName = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase(Locale.ROOT);
+        batchFileSystemName1 = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase(Locale.ROOT);
+        batchFileSystemName2 = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase(Locale.ROOT);
+        fileName = RandomStringUtils.secure().nextAlphabetic(5);
         fileSystemClient = serviceClient.getFileSystemClient(fileSystemName);
         batchFileSystemClient = 
serviceClient.getFileSystemClient(batchFileSystemName);
         batchFileSystemClient1 = 
serviceClient.getFileSystemClient(batchFileSystemName1);
@@ -217,7 +217,7 @@ public class DataLakeConsumerIT extends Base {
     }
 
     private String generateRandomFileName(String extension) {
-        return RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT) 
+ "." + extension;
+        return 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase(Locale.ROOT) + "." + 
extension;
     }
 
 }
diff --git 
a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
 
b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
index d14441c21bc8..941fe0b3b4a7 100644
--- 
a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
+++ 
b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeFileOperationIT.java
@@ -52,7 +52,7 @@ public class DataLakeFileOperationIT extends Base {
 
     @BeforeAll
     public void setup() throws Exception {
-        randomFileName = RandomStringUtils.randomAlphabetic(10);
+        randomFileName = RandomStringUtils.secure().nextAlphabetic(10);
 
         fileSystemClientWrapper = new 
DataLakeServiceClientWrapper(serviceClient)
                 
.getDataLakeFileSystemClientWrapper(configuration.getFileSystemName());
diff --git 
a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeProducerIT.java
 
b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeProducerIT.java
index 132c7689d37a..21f40d4624e8 100644
--- 
a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeProducerIT.java
+++ 
b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/DataLakeProducerIT.java
@@ -40,7 +40,7 @@ public class DataLakeProducerIT extends Base {
 
     @BeforeAll
     public void setup() {
-        final String randomSuffix = 
RandomStringUtils.randomAlphabetic(5).toLowerCase(Locale.ROOT);
+        final String randomSuffix = 
RandomStringUtils.secure().nextAlphabetic(5).toLowerCase(Locale.ROOT);
         fileName = "file" + randomSuffix + ".txt";
         fileContent = ("Hello " + 
randomSuffix).getBytes(StandardCharsets.UTF_8);
     }
diff --git 
a/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/integration/StorageQueueBase.java
 
b/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/integration/StorageQueueBase.java
index 666e361eeb49..de8df883bb18 100644
--- 
a/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/integration/StorageQueueBase.java
+++ 
b/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/integration/StorageQueueBase.java
@@ -72,7 +72,7 @@ public class StorageQueueBase extends CamelTestSupport {
 
     @BeforeAll
     public void initProperties() {
-        queueName = RandomStringUtils.randomAlphabetic(5).toLowerCase();
+        queueName = RandomStringUtils.secure().nextAlphabetic(5).toLowerCase();
 
         configuration = new QueueConfiguration();
         configuration.setCredentials(new StorageSharedKeyCredential(
diff --git 
a/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/operations/integration/QueueOperationsIT.java
 
b/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/operations/integration/QueueOperationsIT.java
index a5c68540cd58..213654ce1751 100644
--- 
a/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/operations/integration/QueueOperationsIT.java
+++ 
b/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/operations/integration/QueueOperationsIT.java
@@ -72,7 +72,7 @@ class QueueOperationsIT extends CamelTestSupport {
 
     @Test
     public void testCreateDeleteQueue() {
-        final String queueName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String queueName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
         final QueueClientWrapper clientWrapper = 
serviceClientWrapper.getQueueClientWrapper(queueName);
         final QueueOperations operations = new QueueOperations(configuration, 
clientWrapper);
 
@@ -102,7 +102,7 @@ class QueueOperationsIT extends CamelTestSupport {
 
     @Test
     public void testSendMessageAndClearQueue() {
-        final String queueName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String queueName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
         final QueueClientWrapper clientWrapper = 
serviceClientWrapper.getQueueClientWrapper(queueName);
         final QueueOperations operations = new QueueOperations(configuration, 
clientWrapper);
 
@@ -248,7 +248,7 @@ class QueueOperationsIT extends CamelTestSupport {
     }
 
     private QueueOperations getQueueOperations() {
-        final String queueName = 
RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        final String queueName = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
         final QueueClientWrapper clientWrapper = 
serviceClientWrapper.getQueueClientWrapper(queueName);
         return new QueueOperations(configuration, clientWrapper);
     }
diff --git 
a/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/operations/integration/QueueServiceOperationsIT.java
 
b/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/operations/integration/QueueServiceOperationsIT.java
index 4da6c86b7599..aef7ea9088dd 100644
--- 
a/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/operations/integration/QueueServiceOperationsIT.java
+++ 
b/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/operations/integration/QueueServiceOperationsIT.java
@@ -53,9 +53,9 @@ class QueueServiceOperationsIT {
     public void setup() throws Exception {
         final Properties properties = 
QueueTestUtils.loadAzureAccessFromJvmEnv();
 
-        queueName1 = RandomStringUtils.randomAlphabetic(10).toLowerCase();
-        queueName2 = RandomStringUtils.randomAlphabetic(10).toLowerCase();
-        queueName3 = RandomStringUtils.randomAlphabetic(10).toLowerCase();
+        queueName1 = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
+        queueName2 = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
+        queueName3 = 
RandomStringUtils.secure().nextAlphabetic(10).toLowerCase();
 
         configuration = new QueueConfiguration();
         configuration.setAccountName(properties.getProperty("account_name"));
diff --git 
a/components/camel-dhis2/camel-dhis2-component/src/test/java/org/apache/camel/component/dhis2/Dhis2PutIT.java
 
b/components/camel-dhis2/camel-dhis2-component/src/test/java/org/apache/camel/component/dhis2/Dhis2PutIT.java
index 49b396a25446..a9afb86b7de3 100644
--- 
a/components/camel-dhis2/camel-dhis2-component/src/test/java/org/apache/camel/component/dhis2/Dhis2PutIT.java
+++ 
b/components/camel-dhis2/camel-dhis2-component/src/test/java/org/apache/camel/component/dhis2/Dhis2PutIT.java
@@ -61,7 +61,7 @@ public class Dhis2PutIT extends AbstractDhis2TestSupport {
         // parameter type is java.util.Map
         headers.put("CamelDhis2.queryParams", new HashMap<>());
 
-        String name = RandomStringUtils.randomAlphabetic(8);
+        String name = RandomStringUtils.secure().nextAlphabetic(8);
         final InputStream result = requestBodyAndHeaders(endpointUri,
                 new 
OrganisationUnit().withName(name).withShortName(name).withOpeningDate(new 
Date()), headers);
         OrganisationUnit organisationUnit


Reply via email to