Versions Compared

Key

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

...

The close() method can throw an IOException which, if thrown, would prevent execution of any subsequent clean-up statements. This remains undiagnosed at compile time The compiler will not diagnose this problem because the closedoOperation() method 's throws clause specifies the same exceptions as do the throws clauses of methods read() and write()explicitly declares that it may throw IOException.

Compliant Solution (Handle Exceptions in finally Block)

...