-
Notifications
You must be signed in to change notification settings - Fork 145
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
Fatal exceptions should still cause resource disposal #173
Comments
Fixed in #159. Try v3.1.0 |
I was using 3.1.0. This problem is not fixed; I'm working on a PR to solve this problem for real. |
A small proof-of-concept of code snippet to illustrate problem would be fine here. |
I am curious - I don't have any |
You do have I'm working on debugging some tests I wrote. One of them should demonstrate the problem with the original code. Stand by. |
I have posted PR #175 to address this issue. |
…n-handling Managed resource exception handling - fix for #173
@argv-minus-one : Thanks for the PR. I did some DRYing up of the code. Can you please take a look here: #178 |
The use of
Try
andNonFatal
in the ARM code is a bad idea. Besides things likeStackOverflowError
,NonFatal
also excludesNonLocalReturnControl
, which is used by the compiler to implement non-local return. As a result, a non-local return through ARM will leak file handles.Please use
try…finally
(andThrowable#addSuppressed
, as appropriate) instead, like Java try-with-resources does.The text was updated successfully, but these errors were encountered: