Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3800

Fix Resocue leak due to Files.list and Files.walk

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.6.0
    • None
    • None

    Description

      Files.list and Files.walk will open dir stream, we should close it.

       

      see jdk:

      the

      {[@code|https://github.com/code] try}

      -with-resources construct should be used to ensure that the
      stream's

      {[@link|https://github.com/link] Stream#close close}

      method is invoked after the stream
      operations are completed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xiaoheipangzi lujie
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h