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 2021/07/05 00:04:23 UTC
[groovy] 02/02: Tweak the initial capacity of singleton bucket
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
commit ae92f9a5e5a08983547bb61f506e606fa6879d3a
Author: Daniel Sun <su...@apache.org>
AuthorDate: Mon Jul 5 08:03:15 2021 +0800
Tweak the initial capacity of singleton bucket
---
.../groovy/ginq/provider/collection/runtime/QueryableCollection.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 913bd49..d3ea174 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
@@ -138,7 +138,7 @@ class QueryableCollection<T> implements Queryable<T>, Serializable {
super(initialCapacity);
}
static <E> Bucket<E> singletonBucket(E o) {
- Bucket<E> bucket = new Bucket<>();
+ Bucket<E> bucket = new Bucket<>(1);
bucket.add(o);
return bucket;
}