Skip to content
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

Make sure Commits are closed when using Commits::stream #111

Closed
wants to merge 2 commits into from

Conversation

JornVernee
Copy link
Member

@JornVernee JornVernee commented Aug 30, 2019

I noticed most places that are using Commits::stream are not actually closing the underlying resource.

I've added an onClose handler to the returned stream, and also overrode forEach (from Iterable) to call close. Unfortunately, the stream onClose handler is not called automatically when a terminal operation occurs, so we still have to use try-with-resources when using Commits::stream (which I've addressed).

Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Approvers

  • Erik Helin (ehelin - Reviewer)

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 30, 2019

👋 Welcome back jvernee! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

@mlbridge
Copy link

@mlbridge mlbridge bot commented Aug 30, 2019

Webrevs

edvbld
edvbld approved these changes Aug 30, 2019
Copy link
Member

@edvbld edvbld left a comment

Looks good, thanks for fixing this!

@openjdk openjdk bot removed the rfr label Aug 30, 2019
@openjdk
Copy link

@openjdk openjdk bot commented Aug 30, 2019

@JornVernee This change can now be integrated. The commit message will be:

 Make sure Commits are closed when using Commits::stream

Reviewed-by: ehelin
  • If you would like to add a summary, use the /summary command.
  • To list additional contributors, use the /contributor command.

Since the source branch of this PR was last updated there have been 2 commits pushed to the master branch:

  • cbe145f: Make sure Commits are closed when using Commits::stream
  • 8501faf: Add topological merge bot

Your changes cannot be rebased automatically without conflicts, so you will need to merge master into your branch before integrating.

@openjdk openjdk bot added the ready label Aug 30, 2019
@JornVernee
Copy link
Member Author

@JornVernee JornVernee commented Aug 30, 2019

/integrate

@openjdk openjdk bot closed this Aug 30, 2019
@openjdk
Copy link

@openjdk openjdk bot commented Aug 30, 2019

@JornVernee The following commits have been pushed to master since your change was applied:

Your commit was automatically rebased without conflicts.
Pushed as commit cbe145f.

@JornVernee JornVernee deleted the onclose branch Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants