|
FindOneAndUpdate and FindOneAndUpdateAsync methods have duplicated checks for collection not being null, but no checks for filter as other methods do.
Possible it is a typo and one check is excessive, or it is a bug and some necessary check is not done.
public static TDocument FindOneAndUpdate<TDocument>(this IMongoCollection<TDocument> collection, FilterDefinition<TDocument> filter, UpdateDefinition<TDocument> update, FindOneAndUpdateOptions<TDocument, TDocument> options = null, CancellationToken cancellationToken = default(CancellationToken))
|
{
|
Ensure.IsNotNull(collection, nameof(collection));
|
Ensure.IsNotNull(collection, nameof(collection));
|
https://github.com/mongodb/mongo-csharp-driver/blob/e2af10c0bf92fe1d4ed39bd27bad88c927bf9426/src/MongoDB.Driver/IMongoCollectionExtensions.cs#L697-L698
|