You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2022/01/31 16:30:08 UTC

[GitHub] [avro] KyleSchoonover commented on a change in pull request #1485: AVRO-3335 Evaluate input of GenerateNames

KyleSchoonover commented on a change in pull request #1485:
URL: https://github.com/apache/avro/pull/1485#discussion_r795845967



##########
File path: lang/csharp/src/apache/main/CodeGen/CodeGen.cs
##########
@@ -219,8 +219,14 @@ protected virtual void processProtocols()
         /// <returns>
         /// List of named schemas.
         /// </returns>
-        protected virtual SchemaNames generateNames(Protocol protocol)
+        /// <exception cref="System.ArgumentNullException">protocol - Protocol can not be null.</exception>
+        protected virtual SchemaNames GenerateNames(Protocol protocol)
         {
+            if (protocol == null)
+            {
+                throw new ArgumentNullException(nameof(protocol), "Protocol can not be null");

Review comment:
       Honestly, it's a weird pattern, but really it's to make sure your messaging is up to date when you change the name of a variable.  It's the equivalent of "protocol."  It's literally the name of the variable as a string.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org