diff --git a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java index ad89f442ab8..18c544a4953 100644 --- a/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java +++ b/oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java @@ -42,6 +42,7 @@ import java.util.function.Supplier; import java.util.stream.StreamSupport; +import org.apache.commons.collections4.IterableUtils; import org.apache.jackrabbit.guava.common.base.Stopwatch; import org.apache.jackrabbit.guava.common.collect.Iterators; import org.apache.jackrabbit.oak.commons.sort.StringSort; @@ -75,7 +76,6 @@ import static java.util.stream.Collectors.toMap; import static java.util.stream.Collectors.toSet; -import static org.apache.jackrabbit.guava.common.collect.Iterables.all; import static org.apache.jackrabbit.guava.common.collect.Iterators.partition; import static java.util.concurrent.TimeUnit.MICROSECONDS; import static org.apache.jackrabbit.oak.plugins.document.Collection.NODES; @@ -2304,7 +2304,7 @@ private Iterator previousDocIdsFor(NodeDocument doc) { Map prevRanges = doc.getPreviousRanges(true); if (prevRanges.isEmpty()) { return Collections.emptyIterator(); - } else if (all(prevRanges.values(), FIRST_LEVEL::test)) { + } else if (IterableUtils.matchesAll(prevRanges.values(), FIRST_LEVEL::test)) { // all previous document ids can be constructed from the // previous ranges map. this works for first level previous // documents only. diff --git a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BackgroundWriteTest.java b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BackgroundWriteTest.java index 5e64c7ebaed..2f256602345 100644 --- a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BackgroundWriteTest.java +++ b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/BackgroundWriteTest.java @@ -19,10 +19,10 @@ import java.util.ArrayList; import java.util.List; +import org.apache.commons.collections4.IterableUtils; import org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore; import org.junit.Test; -import static org.apache.jackrabbit.guava.common.collect.Iterables.all; import static org.apache.jackrabbit.oak.plugins.document.TestUtils.IS_LAST_REV_UPDATE; import static org.junit.Assert.assertTrue; @@ -64,7 +64,7 @@ private static final class TestStore extends MemoryDocumentStore { @Override public List createOrUpdate(Collection collection, List updateOps) { - if (all(updateOps, IS_LAST_REV_UPDATE::test)) { + if (IterableUtils.matchesAll(updateOps, IS_LAST_REV_UPDATE::test)) { assertTrue(updateOps.size() <= UnsavedModifications.BACKGROUND_MULTI_UPDATE_LIMIT); } return super.createOrUpdate(collection, updateOps);