Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-13377

Fix Resocue leak due to Files.list

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0
    • None
    • None

    Description

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

       

      see jdk: the

       {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

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

              Dates

                Created:
                Updated:
                Resolved: