Fix PMD issue: Either refer to method with static import or class, but
not both
This commit is contained in:
parent
34e4ef7eaa
commit
cec7857a0e
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue