Remove unnecessary check in GetIsExtensionsInitialized

pull/5936/head
Sydney Acksman 6 years ago
parent b78330b21d
commit 8dc69ede45
  1. 5
      csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs

@ -138,11 +138,6 @@ namespace Google.Protobuf.Reflection
internal bool GetIsExtensionsInitialized(IMessage message) 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) if (Proto.ExtensionRange.Count == 0)
{ {
return true; return true;

Loading…
Cancel
Save