The following assertion is incorrect, the behavior of Assert.state is to throw an exception when the expression is false
private void validateConfiguration() {
if (hasCustomAddress() || hasCustomCredentials() || hasReplicaSet()) {
Assert.state(this.properties.getUri() == null,
"Invalid mongo configuration, either uri or host/port/credentials/replicaSet must be specified");
}
}
The code above throws an exception when the configuration includes a valid mongo-URI
22256 has a proposed fix.
Comment From: wilkinsona
As explained in #22256, I believe that this is working as designed.