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

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

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 18
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      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

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

                Dates

                Created:
                Updated:
                Resolved: