-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COLLECTIONS-770 When creating an iterator chain containing other iterator chains flatten the resulting internal object. #308
base: master
Are you sure you want to change the base?
Conversation
…ator chains flatten the resulting internal object.
Codecov Report
@@ Coverage Diff @@
## master #308 +/- ##
============================================
+ Coverage 85.87% 85.88% +0.01%
- Complexity 4676 4683 +7
============================================
Files 292 292
Lines 13469 13482 +13
Branches 1955 1959 +4
============================================
+ Hits 11566 11579 +13
Misses 1326 1326
Partials 577 577
Continue to review full report at Codecov.
|
…ator chains flatten the resulting internal object. Fix checkstyle issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test code does not duplicate the code in the bug report COLLECTIONS-770 nor the closely related COLLECTIONS-722. I would like to see both implemented if possible.
try { | ||
iteratorChainOfChains.next(); | ||
} catch (final Exception e) { | ||
assertEquals("NoSuchElementException must be thrown", e.getClass(), NoSuchElementException.class); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace this with assertThrows()
try { | ||
iteratorChainOfChains.next(); | ||
} catch (final Exception e) { | ||
assertEquals("NoSuchElementException must be thrown", e.getClass(), NoSuchElementException.class); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace this with assertThrows()
Contributed on behalf of the @opencastsoftware open source team
I am slightly wary of opening up UnmodifiableIterator, but this seems to solve the performance degradation of nested IteratorChains seen in COLLECTIONS-770