You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/08/23 14:54:34 UTC

[commons-lang] branch master updated: Fix PMD issue: Either refer to method with static import or class, but not both

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 cec7857a0 Fix PMD issue: Either refer to method with static import or class, but not both
cec7857a0 is described below

commit cec7857a0e35fe605abda09de78df53099c3207f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Aug 23 10:54:28 2022 -0400

    Fix PMD issue: Either refer to method with static import or class, but
    not both
---
 src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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