File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/query Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,7 @@ protected SpELExpressionEvaluator getSpELExpressionEvaluatorFor(ExpressionDepend
234
234
* @since 2.4
235
235
*/
236
236
protected CodecRegistry getCodecRegistry () {
237
- return operations .execute (AbstractMongoQuery :: obtainCodecRegistry );
237
+ return operations .execute (MongoDatabase :: getCodecRegistry );
238
238
}
239
239
240
240
/**
@@ -275,8 +275,4 @@ protected CodecRegistry getCodecRegistry() {
275
275
* @since 2.0.4
276
276
*/
277
277
protected abstract boolean isLimiting ();
278
-
279
- private static CodecRegistry obtainCodecRegistry (MongoDatabase db ) {
280
- return db .getCodecRegistry ();
281
- }
282
278
}
Original file line number Diff line number Diff line change 20
20
import org .bson .Document ;
21
21
import org .bson .codecs .configuration .CodecRegistry ;
22
22
import org .reactivestreams .Publisher ;
23
+
23
24
import org .springframework .core .convert .converter .Converter ;
24
25
import org .springframework .data .mapping .model .EntityInstantiators ;
25
26
import org .springframework .data .mapping .model .SpELExpressionEvaluator ;
44
45
import org .springframework .util .Assert ;
45
46
46
47
import com .mongodb .MongoClientSettings ;
47
- import com .mongodb .reactivestreams .client .MongoDatabase ;
48
48
49
49
/**
50
50
* Base class for reactive {@link RepositoryQuery} implementations for MongoDB.
@@ -286,7 +286,7 @@ protected Mono<SpELExpressionEvaluator> getSpelEvaluatorFor(ExpressionDependenci
286
286
*/
287
287
protected Mono <CodecRegistry > getCodecRegistry () {
288
288
289
- return Mono .from (operations .execute (AbstractReactiveMongoQuery :: obtainCodecRegistry ))
289
+ return Mono .from (operations .execute (db -> Mono . just ( db . getCodecRegistry ()) ))
290
290
.defaultIfEmpty (MongoClientSettings .getDefaultCodecRegistry ());
291
291
}
292
292
@@ -328,8 +328,4 @@ protected Mono<CodecRegistry> getCodecRegistry() {
328
328
* @since 2.0.4
329
329
*/
330
330
protected abstract boolean isLimiting ();
331
-
332
- private static Mono <CodecRegistry > obtainCodecRegistry (MongoDatabase db ) {
333
- return Mono .justOrEmpty (db .getCodecRegistry ());
334
- }
335
331
}
You can’t perform that action at this time.
0 commit comments