Skip to content

Commit f51ffae

Browse files
committed
JAVA-2047: Use default DBObject Codec for the aggregate helper methods. This is in line with the behavior of the 2.x branch.
1 parent c91251b commit f51ffae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

driver/src/main/com/mongodb/DBCollection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ private Cursor aggregate(final List<? extends DBObject> pipeline, final Aggregat
13681368
return null;
13691369
}
13701370
} else {
1371-
AggregateOperation<DBObject> operation = new AggregateOperation<DBObject>(getNamespace(), stages, objectCodec)
1371+
AggregateOperation<DBObject> operation = new AggregateOperation<DBObject>(getNamespace(), stages, getDefaultDBObjectCodec())
13721372
.readConcern(getReadConcern())
13731373
.maxTime(options.getMaxTime(MILLISECONDS), MILLISECONDS)
13741374
.allowDiskUse(options.getAllowDiskUse())

driver/src/test/functional/com/mongodb/DBCollectionSpecification.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ class DBCollectionSpecification extends Specification {
325325
aggregationOutput.results() == [dbObject]
326326
expect executor.getReadOperation(), isTheSameAs(new AggregateOperation(collection.getNamespace(),
327327
[new BsonDocument('$match', new BsonDocument())],
328-
collection.getObjectCodec())
328+
collection.getDefaultDBObjectCodec())
329329
.readConcern(ReadConcern.MAJORITY)
330330
.useCursor(false)
331331
)

0 commit comments

Comments
 (0)