summaryrefslogtreecommitdiff
path: root/src/mongo/rpc
diff options
context:
space:
mode:
authorFaustoleyva54 <faustoleyva54@gmail.com>2020-06-23 15:52:39 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-26 16:15:47 +0000
commit29e009a731de1fed44b7b38c0d0780c9adc49e88 (patch)
tree57eb7b427cb82b7d5627ded7f50e5699eb6aeb50 /src/mongo/rpc
parent33a643298e279b266362729e91481f159e0a7a69 (diff)
downloadmongo-29e009a731de1fed44b7b38c0d0780c9adc49e88.tar.gz
SERVER-44968 Remove useless BSONVersion enum class
Diffstat (limited to 'src/mongo/rpc')
-rw-r--r--src/mongo/rpc/object_check.h9
-rw-r--r--src/mongo/rpc/protocol_fuzzer.cpp2
2 files changed, 2 insertions, 9 deletions
diff --git a/src/mongo/rpc/object_check.h b/src/mongo/rpc/object_check.h
index a15c7e1a0bc..26bc175539e 100644
--- a/src/mongo/rpc/object_check.h
+++ b/src/mongo/rpc/object_check.h
@@ -45,16 +45,9 @@ class Status;
*/
template <>
struct Validator<BSONObj> {
- inline static BSONVersion enabledBSONVersion() {
- // The enabled BSON version is always the latest BSON version if no new BSON types have been
- // added during the release. Otherwise, the BSON version returned should be controlled
- // through the featureCompatibilityVersion.
- return BSONVersion::kLatest;
- }
inline static Status validateLoad(const char* ptr, size_t length) {
- return serverGlobalParams.objcheck ? validateBSON(ptr, length, enabledBSONVersion())
- : Status::OK();
+ return serverGlobalParams.objcheck ? validateBSON(ptr, length) : Status::OK();
}
static Status validateStore(const BSONObj& toStore);
diff --git a/src/mongo/rpc/protocol_fuzzer.cpp b/src/mongo/rpc/protocol_fuzzer.cpp
index e6bbbf14630..19876d0ef47 100644
--- a/src/mongo/rpc/protocol_fuzzer.cpp
+++ b/src/mongo/rpc/protocol_fuzzer.cpp
@@ -52,7 +52,7 @@ struct CompressionInfrastructure {
};
void validateBSON(const BSONObj& obj) {
- validateBSON(obj.objdata(), obj.objsize(), BSONVersion::kLatest).ignore();
+ validateBSON(obj.objdata(), obj.objsize()).ignore();
}
void doFuzzing(ConstDataRangeCursor fuzzedData) try {