Do not pass null credential from ConnectionString to Mongo builder

pull/11528/merge
Andy Wilkinson 7 years ago
parent f2d3f51f3f
commit 12e1fcbfab

@ -142,7 +142,9 @@ public class ReactiveMongoClientFactory {
builder.clusterSettings(getClusterSettings(connection)); builder.clusterSettings(getClusterSettings(connection));
builder.connectionPoolSettings(getConnectionPoolSettings(connection)); builder.connectionPoolSettings(getConnectionPoolSettings(connection));
builder.serverSettings(getServerSettings(connection)); builder.serverSettings(getServerSettings(connection));
builder.credential(connection.getCredential()); if (connection.getCredential() != null) {
builder.credential(connection.getCredential());
}
builder.sslSettings(getSslSettings(connection)); builder.sslSettings(getSslSettings(connection));
builder.socketSettings(getSocketSettings(connection)); builder.socketSettings(getSocketSettings(connection));
if (connection.getReadPreference() != null) { if (connection.getReadPreference() != null) {

Loading…
Cancel
Save