Browse Source
These try-with-resources blocks close the underlying output stream twice: once when closing the CountingOutputStream wrapper, then again when closing the DfsOutputStream out. Simplify by only closing the CountingOutputStream. In practice this shouldn't matter because the close() method of a Closable is required to be idempotent, but avoiding the redundant extra close makes the code simpler to read and understand. Change-Id: I1778c4fc8ba075a2c6cd2129528bb272cb3a1af7stable-4.5
Jonathan Nieder
8 years ago
1 changed files with 4 additions and 4 deletions
Loading…
Reference in new issue