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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: