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 c716bec Trivial refactoring: replace lambda with method reference
c716bec is described below
commit c716bec5ddfbc470f51b40678cee1d26ab8b9d47
Author: Daniel Sun <[email protected]>
AuthorDate: Mon Dec 28 22:14:36 2020 +0800
Trivial refactoring: replace lambda with method reference
---
.../groovy/ginq/provider/collection/runtime/QueryableCollection.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableCollection.java
b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableCollection.java
index 889422b..3571539 100644
---
a/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableCollection.java
+++
b/subprojects/groovy-ginq/src/main/groovy/org/apache/groovy/ginq/provider/collection/runtime/QueryableCollection.java
@@ -73,7 +73,7 @@ class QueryableCollection<T> implements Queryable<T>,
Serializable {
protected List<Tuple2<T, Long>> listWithIndex;
QueryableCollection(Queryable<Tuple2<T, Long>> queryableWithIndex) {
- this(queryableWithIndex.toList().stream().map(e ->
e.getV1()).collect(Collectors.toList()));
+
this(queryableWithIndex.toList().stream().map(Tuple2::getV1).collect(Collectors.toList()));
this.listWithIndex = queryableWithIndex.toList();
}
@@ -508,7 +508,7 @@ class QueryableCollection<T> implements Queryable<T>,
Serializable {
.map(e -> Tuple.tuple(e, rn[0]++))
.collect(Collectors.toList());
- final Queryable<Tuple2<?, Queryable<Tuple2<T, Long>>>> q =
from(listWithIndex).groupBy(wd.partitionBy().compose(e -> e.getV1()));
+ final Queryable<Tuple2<?, Queryable<Tuple2<T, Long>>>> q =
from(listWithIndex).groupBy(wd.partitionBy().compose(Tuple2::getV1));
if (q instanceof QueryableCollection) {
((QueryableCollection) q).makeReusable();
}