You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2019/04/09 03:19:19 UTC
[groovy] branch master updated: GROOVY-9008: minor refactor
This is an automated email from the ASF dual-hosted git repository.
paulk 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 310c5ff GROOVY-9008: minor refactor
310c5ff is described below
commit 310c5ff287627de0d7ee084d7960444a73dde2aa
Author: Paul King <pa...@asert.com.au>
AuthorDate: Tue Apr 9 13:19:11 2019 +1000
GROOVY-9008: minor refactor
---
.../classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
index ab0694a..0f05cb0 100644
--- a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
+++ b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesMethodReferenceExpressionWriter.java
@@ -268,8 +268,7 @@ public class StaticTypesMethodReferenceExpressionWriter extends MethodReferenceE
return mrMethodNodeList.stream()
.map(e -> Tuple.tuple(e, matchingScore(e, mrExpr)))
- .sorted((t1, t2) -> Integer.compare(t2.getV2(), t1.getV2()))
- .findFirst()
+ .min((t1, t2) -> Integer.compare(t2.getV2(), t1.getV2()))
.get()
.getV1();
}