We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0799a03 commit 0d785beCopy full SHA for 0d785be
jnosql-mongodb/src/main/java/org/eclipse/jnosql/databases/mongodb/communication/MongoAuthentication.java
@@ -47,11 +47,11 @@ static Optional<MongoCredential> of(Settings settings) {
47
.map(Object::toString)
48
.map(AuthenticationMechanism::fromMechanismName);
49
50
- if (!user.isPresent()) {
+ if (user.isEmpty()) {
51
return Optional.empty();
52
}
53
54
- if (!mechanism.isPresent()) {
+ if (mechanism.isEmpty()) {
55
return Optional.of(MongoCredential.createCredential(user.orElseThrow(missingExceptionUser()),
56
source.orElseThrow(missingExceptionSource()), password.orElseThrow(missingExceptionPassword())));
57
0 commit comments