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 34851c170a OAK-11582 : removed usage of Guava's Iterables.removeAll() 
with Stream (#2167)
34851c170a is described below

commit 34851c170a174a6a252c91ae6fc4a5c8063c0519
Author: Rishabh Kumar <[email protected]>
AuthorDate: Tue Mar 11 13:56:56 2025 +0530

    OAK-11582 : removed usage of Guava's Iterables.removeAll() with Stream 
(#2167)
    
    Co-authored-by: Rishabh Kumar <[email protected]>
---
 .../exercise/security/privilege/L4_CustomPrivilegeTest.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/oak-exercise/src/test/java/org/apache/jackrabbit/oak/exercise/security/privilege/L4_CustomPrivilegeTest.java
 
b/oak-exercise/src/test/java/org/apache/jackrabbit/oak/exercise/security/privilege/L4_CustomPrivilegeTest.java
index 79bf1bd540..a6f21600e0 100644
--- 
a/oak-exercise/src/test/java/org/apache/jackrabbit/oak/exercise/security/privilege/L4_CustomPrivilegeTest.java
+++ 
b/oak-exercise/src/test/java/org/apache/jackrabbit/oak/exercise/security/privilege/L4_CustomPrivilegeTest.java
@@ -17,15 +17,16 @@
 package org.apache.jackrabbit.oak.exercise.security.privilege;
 
 import java.security.Principal;
+import java.util.Arrays;
+import java.util.LinkedHashSet;
 import java.util.Set;
 import java.util.UUID;
+import java.util.stream.Collectors;
 import javax.jcr.security.Privilege;
 
 import org.apache.jackrabbit.guava.common.collect.Iterables;
 import org.apache.jackrabbit.api.security.authorization.PrivilegeManager;
 import org.apache.jackrabbit.oak.AbstractSecurityTest;
-import org.apache.jackrabbit.oak.commons.collections.IterableUtils;
-import org.apache.jackrabbit.oak.commons.collections.SetUtils;
 import org.apache.jackrabbit.oak.spi.security.principal.EveryonePrincipal;
 import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConstants;
 import org.junit.Test;
@@ -116,10 +117,9 @@ public class L4_CustomPrivilegeTest extends 
AbstractSecurityTest {
             fail();
         }
 
-        Iterable<String> resultNames = 
IterableUtils.transform(SetUtils.toSet(result),
-                Object::toString);
+        Set<String> resultNames = 
Arrays.stream(result).map(Object::toString).collect(Collectors.toCollection(LinkedHashSet::new));
 
-        Iterables.removeAll(resultNames, expectedNames);
+        resultNames.removeAll(expectedNames);
         assertFalse(resultNames.iterator().hasNext());
     }
 

Reply via email to