-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Remove Releasable
in favor of Closeable
#5423
Comments
+1 |
Or should it be just |
Not sure I agree... Sometimes you just want to make sure something is closed even if there's a chance it's already closed... We should be lenient there |
We can use assertion for ensuring things are closed once |
I think it's good to use AutoCloseable since we can then throw already closed exceptiosn? I like the idea - I guess we should have a base class that makes sure the actual releaseing is only happening once? |
@jpountz I think we can lose this now right? |
Closed via e589301. Releasable now extends AutoCloseable and can be used in try-with-resources. |
thx |
given that we are moving to Java 1.7 when Lucene 4.8 lands (#5421) we should take advantage of
try-with
statements and use Closeable instead since it's bascially the same thing!The text was updated successfully, but these errors were encountered: