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 f611f8bd06 OAK-11567 : removed usage of Guava Iterables.size (#2153)
f611f8bd06 is described below
commit f611f8bd0688d0fbd1d0f127b2c0323456dff461
Author: Rishabh Kumar <[email protected]>
AuthorDate: Fri Mar 7 20:45:40 2025 +0530
OAK-11567 : removed usage of Guava Iterables.size (#2153)
Co-authored-by: Rishabh Kumar <[email protected]>
---
.../oak/plugins/document/mongo/CacheInvalidationIT.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/CacheInvalidationIT.java
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/CacheInvalidationIT.java
index 91c773e297..d9b10d22c4 100644
---
a/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/CacheInvalidationIT.java
+++
b/oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/mongo/CacheInvalidationIT.java
@@ -23,6 +23,7 @@ import com.mongodb.ReadPreference;
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.commons.PathUtils;
+import org.apache.jackrabbit.oak.commons.collections.IterableUtils;
import org.apache.jackrabbit.oak.plugins.document.AbstractMongoConnectionTest;
import org.apache.jackrabbit.oak.plugins.document.Collection;
import org.apache.jackrabbit.oak.plugins.document.DocumentMK;
@@ -39,7 +40,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import static org.apache.jackrabbit.guava.common.collect.Iterables.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -104,7 +104,7 @@ public class CacheInvalidationIT extends
AbstractMongoConnectionTest {
//Only 2 entries /a and /a/d would be invalidated
// '/' would have been added to cache in start of backgroundRead
//itself
- assertEquals(initialCacheSizeC1 + totalPaths - 2,
size(ds(c1).getNodeDocumentCache().keys()));
+ assertEquals(initialCacheSizeC1 + totalPaths - 2,
IterableUtils.size(ds(c1).getNodeDocumentCache().keys()));
}
@Test
@@ -144,8 +144,8 @@ public class CacheInvalidationIT extends
AbstractMongoConnectionTest {
}
- private int getCurrentCacheSize(DocumentNodeStore ds){
- return size(ds(ds).getNodeDocumentCache().keys());
+ private int getCurrentCacheSize(DocumentNodeStore ds) {
+ return IterableUtils.size(ds(ds).getNodeDocumentCache().keys());
}
private static void refreshHead(DocumentNodeStore store) {