Skip to content

Commit f8d1082

Browse files
committed
JAVA-2751: Fix incorrect use of MongoClient constructor in async documentation.
1 parent 3ea428a commit f8d1082

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/reference/content/driver-async/getting-started/quick-start-pojo.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ There are multiple ways to set the `pojoCodecRegistry` for use:
151151
- You can set it when instantiating a MongoClient object:
152152

153153
```java
154-
MongoClient mongoClient = new MongoClient("localhost", MongoClientOptions.builder().codecRegistry(pojoCodecRegistry).build());
154+
MongoClient mongoClient = MongoClients.create(MongoClientSettings.builder()
155+
.codecRegistry(pojoCodecRegistry).build());
155156
```
156157

157158
- You can use an alternative `CodecRegistry` with a `MongoDatabase`:

0 commit comments

Comments
 (0)