This is an automated email from the ASF dual-hosted git repository.
daim pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
The following commit(s) were added to refs/heads/trunk by this push:
new 71de390a30 OAK-11689 : removed usage of Guava's Iterators.addAll
(#2264)
71de390a30 is described below
commit 71de390a30589a9a9126dff06e769971bf393ca2
Author: Rishabh Kumar <[email protected]>
AuthorDate: Fri May 2 22:02:22 2025 +0530
OAK-11689 : removed usage of Guava's Iterators.addAll (#2264)
Co-authored-by: Rishabh Kumar <[email protected]>
---
.../jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java | 2 +-
.../index/lucene/directory/ActiveDeletedBlobCollectorTest.java | 4 ++--
.../org/apache/jackrabbit/oak/plugins/document/RevisionVector.java | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java
index c14df3fbb8..3d5f16a27f 100644
---
a/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java
+++
b/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/filter/GlobbingPathFilter.java
@@ -82,7 +82,7 @@ public class GlobbingPathFilter implements EventFilter {
public GlobbingPathFilter(@NotNull String pattern, Map<String, Pattern>
patternMap) {
// OAK-5589 : use the fastest way to create a List based on an unknown
deep pattern
this.pattern = new ArrayList<String>(10);
- Iterators.addAll(this.pattern,
elements(requireNonNull(pattern)).iterator());
+
elements(requireNonNull(pattern)).iterator().forEachRemaining(this.pattern::add);
this.patternMap = requireNonNull(patternMap);
}
diff --git
a/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java
b/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java
index 4cec1e2d3b..7145030928 100644
---
a/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java
+++
b/oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/ActiveDeletedBlobCollectorTest.java
@@ -228,7 +228,7 @@ public class ActiveDeletedBlobCollectorTest {
for (int threadNum = 0; threadNum < numThreads; threadNum++) {
for (int blobCnt = 0; blobCnt < numBlobsPerThread; blobCnt++) {
String id = "Thread" + threadNum + "Blob" + blobCnt;
- Iterators.addAll(deletedChunks, blobStore.resolveChunks(id));
+
blobStore.resolveChunks(id).forEachRemaining(deletedChunks::add);
}
}
@@ -245,7 +245,7 @@ public class ActiveDeletedBlobCollectorTest {
bdc.deleted(markerBlobId, List.of(markerBlobId));
bdc.commitProgress(COMMIT_SUCCEDED);
- Iterators.addAll(markerChunks,
blobStore.resolveChunks(markerBlobId));
+
blobStore.resolveChunks(markerBlobId).forEachRemaining(markerChunks::add);
clock.waitUntil(clock.getTime() + TimeUnit.SECONDS.toMillis(5));
adbc.purgeBlobsDeleted(clock.getTimeIncreasing(), blobStore);
diff --git
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/RevisionVector.java
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/RevisionVector.java
index ea1bfc4172..70e2c29161 100644
---
a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/RevisionVector.java
+++
b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/RevisionVector.java
@@ -221,7 +221,7 @@ public final class RevisionVector implements
Iterable<Revision>, Comparable<Revi
}
}
// add remaining
- Iterators.addAll(pmax, it);
+ it.forEachRemaining(pmax::add);
return new RevisionVector(IterableUtils.toArray(pmax, Revision.class),
false, false);
}