Skip to content

Commit f9723a2

Browse files
rishabhdaimRishabh Kumar
andauthored
OAK-11580 : removed usage of Guava's Iterables.skip() with ListIterator (#2168)
Co-authored-by: Rishabh Kumar <diam@adobe.com>
1 parent a2595d9 commit f9723a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/PasswordHistoryTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.lang.reflect.Field;
2020
import java.util.Collections;
2121
import java.util.List;
22+
import java.util.ListIterator;
2223
import java.util.Map;
2324

2425
import javax.jcr.RepositoryException;
@@ -263,8 +264,8 @@ public void testConfigurationChange() throws Exception {
263264

264265
// only the configured max-size number of entries in the history must be
265266
// checked. additional entries in the history must be ignored
266-
Iterables.skip(oldPwds, 6);
267-
history.updatePasswordHistory(userTree, oldPwds.iterator().next());
267+
ListIterator<String> listIterator = oldPwds.listIterator(6);
268+
history.updatePasswordHistory(userTree, listIterator.next());
268269

269270
// after chaning the pwd again however the rep:pwdHistory property must
270271
// only contain the max-size number of passwords

0 commit comments

Comments
 (0)