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

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


The following commit(s) were added to refs/heads/main by this push:
     new cedc95e5 MongoDB SSLAwareMongoClient: Use isEmpty method instead of 
checking for ""
cedc95e5 is described below

commit cedc95e5befe07f8709f2f2cb5f9fbab5c47d714
Author: Andrea Cosentino <[email protected]>
AuthorDate: Thu Jan 25 10:49:53 2024 +0100

    MongoDB SSLAwareMongoClient: Use isEmpty method instead of checking for ""
    
    Signed-off-by: Andrea Cosentino <[email protected]>
---
 .../org/apache/camel/kamelets/utils/mongodb/SslAwareMongoClient.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/mongodb/SslAwareMongoClient.java
 
b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/mongodb/SslAwareMongoClient.java
index d13163ca..fbe1820f 100644
--- 
a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/mongodb/SslAwareMongoClient.java
+++ 
b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/mongodb/SslAwareMongoClient.java
@@ -67,7 +67,7 @@ public class SslAwareMongoClient implements MongoClient {
         public MongoClient get() {
             String credentials = username == null ? "" : username;
 
-            if (!credentials.equals("")) {
+            if (!credentials.isEmpty()) {
                 credentials += password == null ? "@" : ":" + password + "@";
             }
 

Reply via email to