-
Notifications
You must be signed in to change notification settings - Fork 125
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
Concat applied after filter produces unexpected result #23
Comments
Fixed! Thank you so much, @kotucz |
Thanks for the quick fix! Just one note - this implementation assumes that |
Fixed with 80885bb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Applying
concat()
on stream that is result offilter()
produces incorrect result.Below is new test that reproduces the issue:
The issue is that
hasNext()
implementation infilter()
is not idempotent - when called multiple times, value is skipped.In
concat()
implementation the (filter()
hasNext()
) is called once inhasNext()
and once innext()
, which would be ok, iffilter()
hasNext()
did not have the side-effect.The text was updated successfully, but these errors were encountered: