anirudh-04 commented on PR #17735:
URL: https://github.com/apache/camel/pull/17735#issuecomment-2798848060

   @davsclaus wouldn't createServiceBusSenderClient invocation give npe because 
of the switch case - 
   
   ```
           switch (configuration.getCredentialType()) {
               case CONNECTION_STRING -> 
builder.connectionString(configuration.getConnectionString());
               case TOKEN_CREDENTIAL -> 
builder.credential(fullyQualifiedNamespace, credential);
               case AZURE_IDENTITY -> 
builder.credential(fullyQualifiedNamespace, new 
DefaultAzureCredentialBuilder().build());
           }
   
   ```
   
   Test to replicate, do we need to handle this?
   
   ```
       @Test
       void testCreateBaseServiceBusClientWithNoCredentialType() throws 
Exception {
           ServiceBusConfiguration configuration = new 
ServiceBusConfiguration();
           ServiceBusClientFactory factory = new ServiceBusClientFactory();
           final ServiceBusSenderClient senderClient = 
factory.createServiceBusSenderClient(configuration);
   
           assertNotNull(senderClient);
       }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to