martin-g commented on a change in pull request #1485:
URL: https://github.com/apache/avro/pull/1485#discussion_r795389873



##########
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:
       What does `nameof()` returns for `null` ?

##########
File path: lang/csharp/src/apache/main/CodeGen/CodeGen.cs
##########
@@ -237,7 +243,7 @@ protected virtual SchemaNames generateNames(Protocol 
protocol)
         /// <returns>
         /// List of named schemas.
         /// </returns>
-        protected virtual SchemaNames generateNames(Schema schema)
+        protected virtual SchemaNames GenerateNames(Schema schema)

Review comment:
       As above.

##########
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)

Review comment:
       For backward compatibility we need to keep the old method deprecated for 
few releases.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to