Merge pull request #4237 from awgtek/master

* pr/4237:
  Switch MongoCredential method
This commit is contained in:
Phillip Webb 2015-11-10 12:59:44 -08:00
commit 6c17442415
1 changed files with 2 additions and 2 deletions

View File

@ -217,8 +217,8 @@ public class MongoProperties {
if (hasCustomCredentials()) { if (hasCustomCredentials()) {
String database = this.authenticationDatabase == null String database = this.authenticationDatabase == null
? getMongoClientDatabase() : this.authenticationDatabase; ? getMongoClientDatabase() : this.authenticationDatabase;
credentials = Arrays.asList(MongoCredential.createMongoCRCredential( credentials = Arrays.asList(MongoCredential
this.username, database, this.password)); .createCredential(this.username, database, this.password));
} }
String host = this.host == null ? "localhost" : this.host; String host = this.host == null ? "localhost" : this.host;
int port = determinePort(environment); int port = determinePort(environment);