You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/04/06 10:18:17 UTC

[GitHub] [commons-lang] aherbert commented on a diff in pull request #874: Add early null check MethodUtils.

aherbert commented on code in PR #874:
URL: https://github.com/apache/commons-lang/pull/874#discussion_r843765158


##########
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java:
##########
@@ -327,6 +327,7 @@ public static Object invokeExactMethod(final Object object, final String methodN
     public static Object invokeExactMethod(final Object object, final String methodName, Object[] args, Class<?>[] parameterTypes)
         throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
         Objects.requireNonNull(object, "object");
+        Objects.requireNonNull(object, "methodName");

Review Comment:
   The null check should be on `methodName`



-- 
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@commons.apache.org

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