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

InputStream is not closed in two methods of JarFinder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.0, 3.0.0-alpha1
    • 2.5.0
    • test, util
    • None
    • 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.1.patch.txt
          2 kB
          Swarnim Kulkarni
        2. hadoop-10517-v1.txt
          2 kB
          Ted Yu
        3. hadoop-10517-v2.txt
          2 kB
          Ted Yu

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: