This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch minor-isEmpty in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 423c900d0b2b98697ce036ebe98f18d3206390f5 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Thu Jan 25 10:49:53 2024 +0100 MongoDB SSLAwareMongoClient: Use isEmpty method instead of checking for "" Signed-off-by: Andrea Cosentino <anco...@gmail.com> --- .../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 + "@"; }