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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: None
    • Component/s: tools
    • b11

      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.

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

              Created:
              Updated:
              Resolved: