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

Change EvalResultIterator to implement java.io.Closeable #874

Closed
hansenmc opened this issue Jan 14, 2018 · 1 comment
Closed

Change EvalResultIterator to implement java.io.Closeable #874

hansenmc opened this issue Jan 14, 2018 · 1 comment

Comments

@hansenmc
Copy link
Contributor

hansenmc commented Jan 14, 2018

Given the note in the JavaDocs for the ServerEvalIuationCall that the EvalResultIterator must be closed

  • NOTE: EvalResultIterator MUST BE CLOSED. If you call {@link #eval()} don't forget to call close() on the returned EvalResultIterator to free up the underlying resources.

it would be useful if EvalResultIterator implemented java.io.Closeable.

If the EvalResultIterator implemented Closeable, it would be possible to use try-with-resources to ensure that it is automatically called, and a bunch of finally blocks could be removed for cleaner and more simple code.

@hansenmc hansenmc changed the title Change EvalResultIterator to implement java.io.Closable Change EvalResultIterator to implement java.io.Closeable Jan 14, 2018
@sammefford sammefford added this to the java-client-api-4.0.4 milestone Jan 16, 2018
@sammefford
Copy link
Contributor

Ajit, I made sure EvalTest runs w/out problem. If regression runs fine, I think we can ship this.

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

No branches or pull requests

3 participants