...
The close()
method can throw an IOException
, which, if thrown, would prevent execution of any subsequent cleanup statements. The compiler correctly fails to diagnose this problem This is a problem that will not be diagnosed by the compiler, because any IOException
would be caught by the outer catch
block. Also, an exception thrown from the close()
operation can mask any exception that gets thrown during execution of the Do operations
block, preventing proper recovery.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1d5ff2a7e1a5e023-d26f9676-43ba4b6f-92c794f3-e5d694206d1bf180808d372f"><ac:plain-text-body><![CDATA[ | [[Bloch 2005 | AA. References#Bloch 05]] | Puzzle 41. Field and Stream | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="05587cc132b3fa2e-42f394f9-47c44237-883da1d2-58268390d54be091872ca3fa"><ac:plain-text-body><![CDATA[ | [[Chess 2007 | AA. References#Chess 07]] | 8.3, Preventing Resource Leaks (Java) | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="241f8dd54a543231-806b5bec-47184128-b35f89e9-60e0044d2fdf460639ef3329"><ac:plain-text-body><![CDATA[ | [[Harold 1999 | AA. References#Harold 99]] |
| ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="57b2f99a9f89ea34-3b5d79f3-42d34081-bdaa862c-6a04c2cc2b47fc58f3d3909c"><ac:plain-text-body><![CDATA[ | [[J2SE 2011 | AA. References#J2SE 11]] | The try-with-resources Statement | ]]></ac:plain-text-body></ac:structured-macro> |
...