Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13559

Remove close() within try-with-resources in ChecksumFileSystem/ChecksumFs classes

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.0, 2.9.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: fs
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      My colleague noticed that HADOOP-12994 introduced to places where close() was still called manually within a try-with-resources block.

      I'll attach a patch to remove the manual close() calls.

      These extra calls to close() are probably safe, as InputStream is a Closable, not AutoClosable (the later does not specify close() as idempotent).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fabbri Aaron Fabbri
                Reporter:
                fabbri Aaron Fabbri
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: