Skip to content

Commit 402b9ee

Browse files
committed
[LANG-1789] NullPointerException when generating NoSuchMethodException
in MethodUtils
1 parent cd87ec6 commit 402b9ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ private static Method requireNonNull(final Method method, final Class<?> cls, fi
10231023
throws NoSuchMethodException {
10241024
if (method == null) {
10251025
throw new NoSuchMethodException(String.format("No method: %s.%s(%s)", cls.getName(), methodName,
1026-
Stream.of(parameterTypes).map(c -> c != null ? c.getName() : null).collect(LangCollectors.joining(", "))));
1026+
Stream.of(parameterTypes).map(ClassUtils::getName).collect(LangCollectors.joining(", "))));
10271027
}
10281028
return method;
10291029
}

0 commit comments

Comments
 (0)