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 0697258 Use lambda.
0697258 is described below
commit 0697258b6aabceaed851e12c2ab7f7ff9297517f
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Feb 22 08:56:50 2020 -0500
Use lambda.
Fix formatting.
---
src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java | 9 ++-------
1 file changed, 2 insertions(+), 7 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 be48fb9..98e1b4d 100644
--- a/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
+++ b/src/main/java/org/apache/commons/lang3/reflect/MethodUtils.java
@@ -61,12 +61,7 @@ import org.apache.commons.lang3.Validate;
*/
public class MethodUtils {
- private static final Comparator<Method> METHOD_BY_SIGNATURE = new
Comparator<Method>() {
- @Override
- public int compare(final Method m1, final Method m2) {
- return m1.toString ().compareTo (m2.toString ());
- }
- };
+ private static final Comparator<Method> METHOD_BY_SIGNATURE = (m1, m2) ->
m1.toString().compareTo(m2.toString());
/**
* <p>{@link MethodUtils} instances should NOT be constructed in standard
programming.
@@ -699,7 +694,7 @@ public class MethodUtils {
}
// Sort methods by signature to force deterministic result
- Collections.sort (matchingMethods, METHOD_BY_SIGNATURE);
+ Collections.sort(matchingMethods, METHOD_BY_SIGNATURE);
Method bestMatch = null;
for (final Method method : matchingMethods) {