Created
June 8, 2011 09:28
-
-
Save kana/1014094 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try ResourceSpecification | |
Block | |
⇒ | |
{ | |
final VariableModifiers_minus_final R #resource = Expression; | |
Throwable #primaryException = null; | |
try ResourceSpecificationtail | |
Block | |
catch (final Throwable #t) { | |
#primaryException = t; | |
throw #t; | |
} finally { | |
if (#primaryException != null) { | |
try { | |
#resource.close(); | |
} catch(Exception #suppressedException) { | |
#primaryException.addSuppressedException(#suppressedException); | |
} | |
} else { | |
#resource.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment