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


##########
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:
   -1 You lose the better exception message below, specifically, you lose the 
class name. Follow the code path and you'll see that `getAccessibleMethod()` 
returns null if the `methodName` is null.



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