rishabhdaim commented on code in PR #1723:
URL: https://github.com/apache/jackrabbit-oak/pull/1723#discussion_r1763327411
##########
oak-auth-external/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/external/impl/DynamicSyncContext.java:
##########
@@ -234,7 +235,8 @@ private Map<ExternalIdentityRef, SyncEntry>
collectSyncEntries(@NotNull Iterable
*/
private void collectSyncEntries(@NotNull Iterable<ExternalIdentityRef>
declaredGroupRefs, long depth, @NotNull Map<ExternalIdentityRef, SyncEntry>
map) throws ExternalIdentityException, RepositoryException {
boolean shortcut = shortcut(depth);
- for (ExternalIdentityRef ref : Iterables.filter(declaredGroupRefs,
this::isSameIDP)) {
+ Iterable<ExternalIdentityRef> filtered = () ->
CollectionUtils.toStream(declaredGroupRefs).filter(this::isSameIDP).iterator();
Review Comment:
Another option could be to use `commons-collections`
`IterableUtils.filteredIterable` and same goes for `Iterator`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]