瀏覽代碼

Remove unnecessary check in GetIsExtensionsInitialized

Sydney Acksman 6 年之前
父節點
當前提交
8dc69ede45
共有 1 個文件被更改,包括 0 次插入5 次删除
  1. 0 5
      csharp/src/Google.Protobuf/Reflection/MessageDescriptor.cs

+ 0 - 5
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;