summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/matcher.cpp
diff options
context:
space:
mode:
authorJames Wahlin <james@mongodb.com>2019-01-15 16:56:21 -0500
committerJames Wahlin <james@mongodb.com>2019-02-19 09:13:35 -0500
commitf74085d9935953ccfef6547ab5fdb2db48096828 (patch)
treef35f518a8d367100d396cc61b3fea9079914cca3 /src/mongo/db/matcher/matcher.cpp
parentb5bfc89e28b0c7432c8356d4af9b45b14e29138d (diff)
downloadmongo-f74085d9935953ccfef6547ab5fdb2db48096828.tar.gz
SERVER-39019 Fix incorrect $elemMatch $ne serialization
Diffstat (limited to 'src/mongo/db/matcher/matcher.cpp')
-rw-r--r--src/mongo/db/matcher/matcher.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mongo/db/matcher/matcher.cpp b/src/mongo/db/matcher/matcher.cpp
index 28107d43a69..d51ed4b2061 100644
--- a/src/mongo/db/matcher/matcher.cpp
+++ b/src/mongo/db/matcher/matcher.cpp
@@ -45,13 +45,8 @@ Matcher::Matcher(const BSONObj& pattern,
const ExtensionsCallback& extensionsCallback,
const MatchExpressionParser::AllowedFeatureSet allowedFeatures)
: _pattern(pattern) {
- StatusWithMatchExpression statusWithMatcher =
- MatchExpressionParser::parse(pattern, expCtx, extensionsCallback, allowedFeatures);
- uassert(16810,
- mongoutils::str::stream() << "bad query: " << statusWithMatcher.getStatus().toString(),
- statusWithMatcher.isOK());
-
- _expression = std::move(statusWithMatcher.getValue());
+ _expression = uassertStatusOK(
+ MatchExpressionParser::parse(pattern, expCtx, extensionsCallback, allowedFeatures));
}
bool Matcher::matches(const BSONObj& doc, MatchDetails* details) const {