alexey-pelykh commented on PR #509: URL: https://github.com/apache/commons-collections/pull/509#issuecomment-2259632026
Hi @garydgregory: > You are missing a unit test for Iterator.forEachRemaining() What is the rationale to add that given that `forEachRemaining` is a `hasNext()`/`next()` wrapper and those are explicitly tested? > Also edge cases like what if the first list, a middle list or the last list is empty. Reasonable, added. > IOW what is the expected behavior if in your example letters, numbers, or symbols is empty Added tests to be explicit. If at least one list is empty, cartesian product returns no tuples. > What should happen if the lists point to each other or have cycles? If any of the passed iterables has cycle and thus is infinite, the iterator would also produce an infinite result. Here the behavior is the same as in nested for-loop. Could you please elaborate on the lists pointing to each other case as I'm not exactly sure I got you there. -- 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]
