Skip to content

Commit

Permalink
Make sure that a deprecated method goes through the versioning engine
Browse files Browse the repository at this point in the history
  • Loading branch information
adecler committed May 21, 2020
1 parent 126df18 commit 3b6f6ba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* along with this code. If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
*/

using BH.Engine.Reflection;
using MongoDB.Bson;
using MongoDB.Bson.IO;
using MongoDB.Bson.Serialization;
Expand Down Expand Up @@ -101,7 +102,7 @@ public override MethodBase Deserialize(BsonDeserializationContext context, BsonD
{
MethodBase method = GetMethod(methodName, typeName, paramTypesJson);

if (method == null)
if (method == null || method.IsDeprecated())
{
// Try to upgrade through versioning
BsonDocument doc = new BsonDocument();
Expand Down

0 comments on commit 3b6f6ba

Please sign in to comment.