Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When closing a stream without throwing an exception is a frequent pattern in the code, an alternative solution is to use of a closeHandlingException() method, as shown in this compliant solution.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="98304b91cd008702-9a01b060-421f48b3-9be2aab1-bf39a0fe184cb478326b0b28"><ac:plain-text-body><![CDATA[

[[Bloch 2005

AA. Bibliography#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="0eb545ba6f86e8af-86c6417d-4b04469f-be428c83-803228756b55e9e647dc4663"><ac:plain-text-body><![CDATA[

[[Chess 2007

AA. Bibliography#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="7f0c5c773d820ab0-5bdabe54-4c1d404f-8038a573-4089a9651ffb75b28bc78e27"><ac:plain-text-body><![CDATA[

[[Harold 1999

AA. Bibliography#Harold 99]]

 

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="80733ea8f836a40e-58aa5fba-44d54f98-8a6a8034-74ec03915f5eb640d1c0f203"><ac:plain-text-body><![CDATA[

[[J2SE 2011

AA. Bibliography#J2SE 11]]

The try-with-resources Statement

]]></ac:plain-text-body></ac:structured-macro>

...