Skip to content

Commit

Permalink
Merge pull request #95 from hmcts/feature/add-empty-check-to-password
Browse files Browse the repository at this point in the history
Add empty check to password
  • Loading branch information
rsandell authored Feb 15, 2019
2 parents 1421971 + 15c99bc commit 25232f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ public Descriptor<KnowledgeBase> getDescriptor() {
*/
private MongoClient getMongoConnection() {
if (mongo == null) {
if (password != null && password.getPlainText() != null) {
if (password != null && Util.fixEmpty(password.getPlainText()) != null) {
char[] pwd = password.getPlainText().toCharArray();
MongoCredential credential = MongoCredential.createCredential(userName, dbName, pwd);

Expand Down

0 comments on commit 25232f4

Please sign in to comment.