Fix PMD issue: Either refer to method with static import or class, but

not both
This commit is contained in:
Gary Gregory 2022-08-23 10:54:28 -04:00
parent 34e4ef7eaa
commit cec7857a0e
1 changed files with 1 additions and 3 deletions

View File

@ -16,8 +16,6 @@
*/ */
package org.apache.commons.lang3.reflect; package org.apache.commons.lang3.reflect;
import static java.util.stream.Collectors.toList;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
@ -724,7 +722,7 @@ public class MethodUtils {
final List<Method> methods = Stream.of(cls.getDeclaredMethods()) final List<Method> methods = Stream.of(cls.getDeclaredMethods())
.filter(method -> method.getName().equals(methodName)) .filter(method -> method.getName().equals(methodName))
.collect(toList()); .collect(Collectors.toList());
ClassUtils.getAllSuperclasses(cls).stream() ClassUtils.getAllSuperclasses(cls).stream()
.map(Class::getDeclaredMethods) .map(Class::getDeclaredMethods)