Skip to content

Commit 806fc35

Browse files
mikeligthartjyemin
authored andcommitted
Fix incorrect use of async driver in code sample for creating CodecRegistry
This commit changes MongoClient to MongoClients to call getgetDefaultCodecRegistry() and adds value 'true' to automatic().
1 parent 4296d62 commit 806fc35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ to handle the translation to and from [`bson`]({{< relref "bson/index.md" >}}) f
140140

141141
The following example will combine the default codec registry, with the `PojoCodecProvider` configured to automatically create `PojoCodecs`:
142142
```java
143-
CodecRegistry pojoCodecRegistry = fromRegistries(MongoClient.getDefaultCodecRegistry(),
144-
fromProviders(PojoCodecProvider.builder().automatic().build()));
143+
CodecRegistry pojoCodecRegistry = fromRegistries(MongoClients.getDefaultCodecRegistry(),
144+
fromProviders(PojoCodecProvider.builder().automatic(true).build()));
145145
```
146146

147147
### Using the CodecRegistry

0 commit comments

Comments
 (0)