[
https://issues.apache.org/jira/browse/OAK-11073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17880206#comment-17880206
]
Thomas Mueller commented on OAK-11073:
--------------------------------------
This looks good to me. Related: I never really understood why the enhanced
"for" loop doesn't support "Iterator". The reason given in the JSR don't
convince me:
"Appendix I. Design FAQ -- Why can't I use the enhanced for statement with an
Iterator (rather than an Iterable or array)?
Two reasons: (1) The construct would not provide much in the way on syntactic
improvement if you had an explicit iterator in your code, and (2) Execution of
the loop would have the "side effect" of advancing (and typically exhausting)
the iterator. In other words, the enhanced for statement provides a simple,
elegant, solution for the common case of iterating over a collection or array,
and does not attempt to address more complicated cases, which are better
addressed with the traditional for statement."
> Create conversion utils in oak-commons to convert iterables/iterators to
> set/list
> ---------------------------------------------------------------------------------
>
> Key: OAK-11073
> URL: https://issues.apache.org/jira/browse/OAK-11073
> Project: Jackrabbit Oak
> Issue Type: Technical task
> Components: commons
> Reporter: Rishabh Daim
> Assignee: Julian Reschke
> Priority: Major
> Fix For: 1.70.0
>
> Attachments: stream-it.diff
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)