Skip to content

Commit ef1861c

Browse files
committed
JAVA-691: Fixed up toString of MongoCredentials so it doesn't print the address of the password char array
1 parent eda4736 commit ef1861c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/com/mongodb/MongoCredentials.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ public int hashCode() {
207207
public String toString() {
208208
return "MongoCredentials{" +
209209
"protocol=" + protocol +
210-
", userName='" + userName + '\'' +
211-
", password=" + password +
212-
", source='" + source + '\'' +
210+
", userName='" + userName +
211+
", password=" + "<hidden>" +
212+
", source='" + source +
213213
'}';
214214
}
215215

0 commit comments

Comments
 (0)