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

InputStream is not closed in two methods of JarFinder

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 3.0.0-alpha1
    • Fix Version/s: 2.5.0
    • Component/s: test, util
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      JarFinder#jarDir() and JarFinder#zipDir() have such code:

                       InputStream is = new FileInputStream(f);
                       copyToZipStream(is, anEntry, zos);
      

      The InputStream is closed in copyToZipStream() but should be enclosed in finally block.

        Attachments

        1. hadoop-10517-v2.txt
          2 kB
          Ted Yu
        2. hadoop-10517-v1.txt
          2 kB
          Ted Yu
        3. HADOOP-10517.1.patch.txt
          2 kB
          Swarnim Kulkarni

          Activity

            People

            • Assignee:
              yuzhihong@gmail.com Ted Yu
              Reporter:
              yuzhihong@gmail.com Ted Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: