visualvm icon indicating copy to clipboard operation
visualvm copied to clipboard

Use dedicated NoMoreSegmentsException to signal end of .hprof file

Open JaroslavTulach opened this issue 3 years ago • 0 comments

There is a org.graalvm.visualvm.lib.jfluid.heap.HeapFactory.createHeap(File hprof, int segment) method to create a Heap object for a particular segment in an .hprof file. However there doesn't seem to be reliable way to distinguish between corrupted file and non-existing segment.

This PR adds (package private) NoMoreSegmentsException that is thrown when the file itself is OK, but the requested segment is missing.

JaroslavTulach avatar Jan 14 '22 09:01 JaroslavTulach