You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by da...@apache.org on 2025/04/30 05:26:02 UTC
(jackrabbit-oak) branch OAK-11689 created (now f35283b104)
This is an automated email from the ASF dual-hosted git repository.
daim pushed a change to branch OAK-11689
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
at f35283b104 OAK-11689 : removed usage of Guava's Iterators.addAll
This branch includes the following new commits:
new f35283b104 OAK-11689 : removed usage of Guava's Iterators.addAll
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(jackrabbit-oak) 01/01: OAK-11689 : removed usage of Guava's Iterators.addAll
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
daim pushed a commit to branch OAK-11689
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit f35283b1044111f421e42cd3b632d22bf4927ba5
Author: Rishabh Kumar <di...@adobe.com>
AuthorDate: Wed Apr 30 10:55:50 2025 +0530
OAK-11689 : removed usage of Guava's Iterators.addAll
---
.../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);
}