visualvm
visualvm copied to clipboard
Use dedicated NoMoreSegmentsException to signal end of .hprof file
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.