You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/12/20 09:50:49 UTC

[GitHub] [cassandra] blerer commented on a change in pull request #1363: Avoid unecessary array allocations and initializations when performin…

blerer commented on a change in pull request #1363:
URL: https://github.com/apache/cassandra/pull/1363#discussion_r772222120



##########
File path: src/java/org/apache/cassandra/cql3/statements/RequestValidations.java
##########
@@ -180,14 +326,13 @@ public static void checkBindValueSet(ByteBuffer b, String messageTemplate, Objec
      *
      * @param object the object to test
      * @param messageTemplate the template used to build the error message
-     * @param messageArgs the message arguments
+     * @param messageArg the message argument
      * @return the object
      * @throws InvalidRequestException if the specified object is not <code>null</code>.
      */
-    public static <T> T checkNull(T object, String messageTemplate, Object... messageArgs)
-            throws InvalidRequestException
+    public static <T> T checkNull(T object, String messageTemplate, Object messageArg) throws InvalidRequestException
     {
-        checkTrue(object == null, messageTemplate, messageArgs);
+        checkTrue(object == null, messageTemplate, messageArg);
         return object;

Review comment:
       Good point. It even probably does not make sense to return the object. I changed the return to void.




-- 
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: pr-unsubscribe@cassandra.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org