Skip to content

Iterator.takeUntilException #62

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

Merged
merged 10 commits into from
Dec 16, 2019
Merged

Conversation

erikvanoosten
Copy link
Contributor

@erikvanoosten erikvanoosten commented Oct 26, 2019

This introduces Iterator.takeUntilException, a method that can be useful in situations where you want to get as much out of an iterator as possible. For example, I used it to read records from a corrupted Avro file.

@linasm
Copy link
Contributor

linasm commented Oct 26, 2019

Maybe it would be worth to implement the 1st in terms of the 2nd? Something like this:

def takeUntilException: Iterator[A] = takeUntilException(_ => ())

@erikvanoosten
Copy link
Contributor Author

Done.

@erikvanoosten
Copy link
Contributor Author

Please let me know if there are more ideas for improving this PR.

@erikvanoosten
Copy link
Contributor Author

I re-opened the PR to force a rebuild in Travis.

@erikvanoosten
Copy link
Contributor Author

Travis fails to install a JDK. Note that the last commit only touched a scaladoc line. Before that commit the Travis build did succeed.

I would appreciate it if this PR got merged. The longer this stays open, the more work there is to maintain it.

@julienrf
Copy link
Collaborator

julienrf commented Nov 7, 2019

Looking at the CI output, the problem does not seem to come from this PR: https://travis-ci.org/scala/scala-collection-contrib/jobs/608709711?utm_medium=notification&utm_source=github_status

@erikvanoosten
Copy link
Contributor Author

erikvanoosten commented Nov 9, 2019

There. That last commit fixes the Travis problem.

@SethTisue
Copy link
Member

needs rebase, after #70

@erikvanoosten
Copy link
Contributor Author

@SethTisue I will gladly do that if someone tells me she/he is willing to merge this pr.

@SethTisue
Copy link
Member

SethTisue commented Dec 15, 2019

seems mergeable to me, wdyt @julienrf?

@julienrf
Copy link
Collaborator

Yes, let’s merge it! Thanks @erikvanoosten for your patience!

@erikvanoosten
Copy link
Contributor Author

@julienrf Its mergeable again :)

@julienrf julienrf merged commit ad5a950 into scala:master Dec 16, 2019
@julienrf
Copy link
Collaborator

Thanks @erikvanoosten!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants