This is an automated email from the ASF dual-hosted git repository.

daim pushed a commit to branch OAK-11581
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 19d651bf489dadae6b479802d038a2925ee4bd6c
Author: Rishabh Kumar <[email protected]>
AuthorDate: Tue Mar 11 11:48:29 2025 +0530

    OAK-11581 : removed usage of Guava's Iterables.cycle() with Stream
---
 .../jackrabbit/oak/composite/CompositeChildrenCountTest.java       | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/CompositeChildrenCountTest.java
 
b/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/CompositeChildrenCountTest.java
index ce1b150641..e87c8f642a 100644
--- 
a/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/CompositeChildrenCountTest.java
+++ 
b/oak-store-composite/src/test/java/org/apache/jackrabbit/oak/composite/CompositeChildrenCountTest.java
@@ -40,8 +40,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
-import static org.apache.jackrabbit.guava.common.collect.Iterables.cycle;
+import java.util.stream.Stream;
 
 import static java.lang.Long.MAX_VALUE;
 import static java.util.Arrays.asList;
@@ -219,8 +218,8 @@ public class CompositeChildrenCountTest {
         @Override
         public Iterable<? extends ChildNodeEntry> getChildNodeEntries() {
             if (children == null) {
-                Iterable<? extends ChildNodeEntry> childrenIterable = 
cycle(new MemoryChildNodeEntry("child", EMPTY_NODE));
-                return 
asCountingIterable(IterableUtils.limit(childrenIterable, childrenCount == 
MAX_VALUE ? 1000 : (int) childrenCount));
+                Stream<? extends ChildNodeEntry> childrenIterable = 
Stream.generate(() -> new MemoryChildNodeEntry("child", EMPTY_NODE));
+                return 
asCountingIterable(IterableUtils.limit(childrenIterable::iterator, 
childrenCount == MAX_VALUE ? 1000 : (int) childrenCount));
             } else {
                 return 
asCountingIterable(IterableUtils.transform(asList(children), input -> new 
MemoryChildNodeEntry(input, EMPTY_NODE)));
             }

Reply via email to