Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8269909

getStack method in hprof.parser.Reader should use try-with-resource

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 18
    • tools
    • b11

    Description

      The current implementation of getStack() method in hprof.parser.Reader use GZIPInputStream and FileInputStream to verify the heap dump, but they are not closed nicely.

      try-with-resource should be used in this method to guarantee the file streams get closed properly.

      Attachments

        Issue Links

          Activity

            People

              lzang Lin Zang
              lzang Lin Zang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: