This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 402b9ee8c [LANG-1789] NullPointerException when generating
NoSuchMethodException in MethodUtils
402b9ee8c is described below
commit 402b9ee8c0a227f37c380f9935bdee9dcc80c945
Author: Gary D. Gregory <[email protected]>
AuthorDate: Tue Oct 14 08:34:33 2025 -0400
[LANG-1789] NullPointerException when generating NoSuchMethodException
in MethodUtils
---
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
index 5bebd9b3e..731443f11 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
@@ -1023,7 +1023,7 @@ private static Method requireNonNull(final Method method,
final Class<?> cls, fi
throws NoSuchMethodException {
if (method == null) {
throw new NoSuchMethodException(String.format("No method:
%s.%s(%s)", cls.getName(), methodName,
- Stream.of(parameterTypes).map(c -> c != null ? c.getName()
: null).collect(LangCollectors.joining(", "))));
+
Stream.of(parameterTypes).map(ClassUtils::getName).collect(LangCollectors.joining(",
"))));
}
return method;
}