From 8dc69ede45431d8e87ada404e3dab0fa0de5b1a7 Mon Sep 17 00:00:00 2001 From: Sydney Acksman Date: Sun, 5 May 2019 13:28:19 -0500 Subject: [PATCH] Remove unnecessary check in GetIsExtensionsInitialized --- csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs index e375ad9fab..a6ecfb984b 100644 --- a/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs +++ b/csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs @@ -138,11 +138,6 @@ namespace Google.Protobuf.Reflection internal bool GetIsExtensionsInitialized(IMessage message) { - if (!object.ReferenceEquals(message.Descriptor, this)) - { - throw new InvalidOperationException("message's descriptor reference does not match this"); - } - if (Proto.ExtensionRange.Count == 0) { return true;