diff --git a/source/fundamentals/auth.txt b/source/fundamentals/auth.txt index cd965ce31..9d2a20fe6 100644 --- a/source/fundamentals/auth.txt +++ b/source/fundamentals/auth.txt @@ -489,7 +489,7 @@ that returns new credentials as shown in the following example: :dedent: :start-after: start refreshCredentials :end-before: end refreshCredentials - :emphasize-lines: 4-5,9 + :emphasize-lines: 4-5,8-9 .. note:: diff --git a/source/includes/fundamentals/code-snippets/MongoDbAwsAuth.java b/source/includes/fundamentals/code-snippets/MongoDbAwsAuth.java index 0f323038b..f2678ac96 100644 --- a/source/includes/fundamentals/code-snippets/MongoDbAwsAuth.java +++ b/source/includes/fundamentals/code-snippets/MongoDbAwsAuth.java @@ -108,7 +108,7 @@ private static void refreshCredentials() { return new AwsCredential("", "", ""); }; - MongoCredential credential = MongoCredential.createAwsCredential("", "".toCharArray()) + MongoCredential credential = MongoCredential.createAwsCredential(null, null) .withMechanismProperty(MongoCredential.AWS_CREDENTIAL_PROVIDER_KEY, awsFreshCredentialSupplier); MongoClient mongoClient = MongoClients.create( MongoClientSettings.builder()