Skip to content

Commit

Permalink
MongoDB SSLAwareMongoClient: Use isEmpty method instead of checking f…
Browse files Browse the repository at this point in the history
…or ""

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
  • Loading branch information
oscerd committed Jan 25, 2024
1 parent 752bb36 commit 423c900
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void checkServerTrusted(X509Certificate[] arg0, String arg1)
public MongoClient get() {
String credentials = username == null ? "" : username;

if (!credentials.equals("")) {
if (!credentials.isEmpty()) {
credentials += password == null ? "@" : ":" + password + "@";
}

Expand Down

0 comments on commit 423c900

Please sign in to comment.