You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2019/12/17 09:21:54 UTC

[groovy] branch master updated: Fix some potential issues on some JDK

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new a7c00d9  Fix some potential issues on some JDK
a7c00d9 is described below

commit a7c00d914e3393231c7b4743635dbddf9be7e41d
Author: Daniel Sun <su...@apache.org>
AuthorDate: Tue Dec 17 17:20:53 2019 +0800

    Fix some potential issues on some JDK
    
    https://github.com/apache/groovy/runs/351813029
---
 src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java b/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
index aba0d55..b9027d1 100644
--- a/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
+++ b/src/main/java/org/codehaus/groovy/reflection/ReflectionUtils.java
@@ -129,14 +129,12 @@ public class ReflectionUtils {
         }
     }
 
-    private static final Function<Class<?>, Method[]> GET_DECLARED_METHODS = Class::getDeclaredMethods;
     public static List<Method> getDeclaredMethods(Class<?> type, String name, Class<?>... parameterTypes) {
-        return doGetMethods(type, name, parameterTypes, GET_DECLARED_METHODS);
+        return doGetMethods(type, name, parameterTypes, Class::getDeclaredMethods);
     }
 
-    private static final Function<Class<?>, Method[]> GET_METHODS = Class::getMethods;
     public static List<Method> getMethods(Class<?> type, String name, Class<?>... parameterTypes) {
-        return doGetMethods(type, name, parameterTypes, GET_METHODS);
+        return doGetMethods(type, name, parameterTypes, Class::getMethods);
     }
 
     private static List<Method> doGetMethods(Class<?> type, String name, Class<?>[] parameterTypes, Function<? super Class<?>, ? extends Method[]> f) {