rishabhdaim commented on code in PR #2222:
URL: https://github.com/apache/jackrabbit-oak/pull/2222#discussion_r2039034751


##########
oak-core/src/test/java/org/apache/jackrabbit/oak/security/principal/EveryoneFilterTest.java:
##########
@@ -84,23 +86,23 @@ public void testMissingEveryoneNullHint() {
 
     @Test
     public void testMissingEveryoneOffset() {
-        Iterator<Principal> principals = Iterators.forArray(anotherPrincipal);
+        Iterator<Principal> principals = List.of(anotherPrincipal).iterator();

Review Comment:
   same as above



##########
oak-core/src/test/java/org/apache/jackrabbit/oak/security/principal/EveryoneFilterTest.java:
##########
@@ -58,9 +60,9 @@ private static int adjustExpectedSize (int searchType, int 
expectedSize) {
 
     @Test
     public void testEveryoneAlreadyIncluded() {
-        Iterator<Principal> principals = 
Iterators.forArray(EveryonePrincipal.getInstance(), anotherPrincipal);
+        Iterator<Principal> principals = 
List.of(EveryonePrincipal.getInstance(), anotherPrincipal).iterator();

Review Comment:
   same as above.



##########
oak-core/src/test/java/org/apache/jackrabbit/oak/security/principal/EveryoneFilterTest.java:
##########
@@ -75,7 +77,7 @@ public void testMissingEveryoneNoRange() {
 
     @Test
     public void testMissingEveryoneNullHint() {
-        Iterator<Principal> principals = Iterators.forArray(anotherPrincipal);
+        Iterator<Principal> principals = List.of(anotherPrincipal).iterator();

Review Comment:
   same as above



##########
oak-core/src/test/java/org/apache/jackrabbit/oak/security/principal/EveryoneFilterTest.java:
##########
@@ -84,23 +86,23 @@ public void testMissingEveryoneNullHint() {
 
     @Test
     public void testMissingEveryoneOffset() {
-        Iterator<Principal> principals = Iterators.forArray(anotherPrincipal);
+        Iterator<Principal> principals = List.of(anotherPrincipal).iterator();
         Iterator<Principal> result = EveryoneFilter.filter(principals, 
EveryonePrincipal.NAME, searchType, 1, Long.MAX_VALUE);
 
         assertEquals(1, IteratorUtils.size(result));
     }
 
     @Test
     public void testMissingEveryoneLimit() {
-        Iterator<Principal> principals = Iterators.forArray();
+        Iterator<Principal> principals = Collections.emptyIterator();
         Iterator<Principal> result = EveryoneFilter.filter(principals, 
EveryonePrincipal.NAME, searchType, 0, 10);
 
         assertEquals(0, IteratorUtils.size(result));
     }
-    
+
     @Test
     public void testResultContainsNull() {
-        Iterator<Principal> principals = Iterators.forArray(anotherPrincipal, 
null, EveryonePrincipal.getInstance());
+        Iterator<Principal> principals = Arrays.asList(new 
Principal[]{anotherPrincipal, null, 
EveryonePrincipal.getInstance()}).iterator();

Review Comment:
   same as above.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to