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="262fc2f967468d41-425ec8af-41854393-837c9635-f8f2f4dc4168048606ef0b87"><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="d098f0aa31f0fab8-fc4fbe53-46584f3e-b7d3be86-4e5cd5f0039fa41d05c5c0ec"><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="520f7f6d202193e5-7b2a26ef-40034441-8f2984f6-8be21950b6b53b582b0b6264"><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="d330cb50e53d1f17-4d5ecd0c-48fe429e-a8649262-3a1fba186bd1135ebdc19ec6"><ac:plain-text-body><![CDATA[

[[J2SE 2011

AA. Bibliography#J2SE 11]]

The try-with-resources Statement

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

...