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

InputStream is not closed in two methods of JarFinder

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment