This repository was archived by the owner on Jul 16, 2024. It is now read-only.
File tree 3 files changed +10
-2
lines changed
bson/src/main/scala/org/mongodb/scala/bson/codecs
driver/src/main/scala/org/mongodb/scala
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import org.bson.codecs.configuration.CodecRegistry
21
21
import com .mongodb .async .client .MongoClients
22
22
23
23
package object codecs {
24
+
25
+ @ deprecated(" Please use org.mongodb.scala.MongoClient.DEFAULT_CODEC_REGISTRY instead" , " 2.9.0" )
24
26
val DEFAULT_CODEC_REGISTRY : CodecRegistry = fromRegistries(
25
27
fromProviders(DocumentCodecProvider (), IterableCodecProvider ()),
26
28
MongoClients .getDefaultCodecRegistry
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ title = "Changelog"
11
11
Changes between released versions
12
12
13
13
### 2.9.0
14
- * Revert Handle NPE caused by SingleResultCallback based Observables [ SCALA-568] ( https://jira.mongodb.org/browse/SCALA-568F )
14
+ * Marked ` org.mongodb.scala.bson.DEFAULT_CODEC_REGISTRY ` as deprecated [ SCALA-562] ( https://jira.mongodb.org/browse/SCALA-562 )
15
+ * Revert Handle NPE caused by SingleResultCallback based Observables [ SCALA-568] ( https://jira.mongodb.org/browse/SCALA-568 )
15
16
16
17
### 2.8.0
17
18
* Updated MongoDB Driver Async to 3.12.0
Original file line number Diff line number Diff line change @@ -21,8 +21,10 @@ import java.io.Closeable
21
21
import com .mongodb .ConnectionString
22
22
import com .mongodb .async .SingleResultCallback
23
23
import com .mongodb .async .client .{MongoClients , MongoClient => JMongoClient , MongoClientSettings => LegacyMongoClientSettings }
24
+ import org .bson .codecs .configuration .CodecRegistries .{fromProviders , fromRegistries }
24
25
import org .bson .codecs .configuration .CodecRegistry
25
26
import org .mongodb .scala .bson .DefaultHelper .DefaultsTo
27
+ import org .mongodb .scala .bson .codecs .{DocumentCodecProvider , IterableCodecProvider }
26
28
import org .mongodb .scala .bson .conversions .Bson
27
29
import org .mongodb .scala .internal .ObservableHelper .observe
28
30
@@ -120,7 +122,10 @@ object MongoClient {
120
122
MongoClient (MongoClients .create(clientSettings, builder.build()))
121
123
}
122
124
123
- val DEFAULT_CODEC_REGISTRY : CodecRegistry = org.mongodb.scala.bson.codecs.DEFAULT_CODEC_REGISTRY
125
+ val DEFAULT_CODEC_REGISTRY : CodecRegistry = fromRegistries(
126
+ fromProviders(DocumentCodecProvider (), IterableCodecProvider ()),
127
+ MongoClients .getDefaultCodecRegistry
128
+ )
124
129
}
125
130
126
131
/**
You can’t perform that action at this time.
0 commit comments