Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -2304,7 +2304,7 @@ private Iterator<String> previousDocIdsFor(NodeDocument doc) {
Map<Revision, Range> 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -64,7 +64,7 @@ private static final class TestStore extends MemoryDocumentStore {
@Override
public <T extends Document> List<T> createOrUpdate(Collection<T> collection,
List<UpdateOp> 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);
Expand Down
Loading