소스 검색

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;