groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [groovy] branch master updated: GROOVY-9008: minor refactor
Date Tue, 09 Apr 2019 03:19:19 GMT
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 <paulk@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();
     }


Mime
View raw message