--- a/jdk/test/com/sun/jdi/SimulResumerTest.java Tue Apr 08 11:25:56 2014 +0100
+++ b/jdk/test/com/sun/jdi/SimulResumerTest.java Tue Apr 08 17:36:13 2014 +0200
@@ -177,12 +177,18 @@
List<StackFrame> frames = thr.frames();
// no failure return value here; could cause an NPE
+ kind = "frames(0, size - 1)";
+ System.out.println("kind = " + kind);
int nframes = frames.size();
- if (nframes > 0) {
- // hmm, how could it ever be 0?
- kind = "frames(0, size - 1)";
- System.out.println("kind = " + kind);
- thr.frames(0, frames.size() - 1);
+ while (nframes > 0) {
+ try {
+ thr.frames(0, nframes - 1);
+ break;
+ } catch (IndexOutOfBoundsException iobe) {
+ // 6815126. let's try to get less frames
+ iobe.printStackTrace();
+ nframes--;
+ }
}
kind = "frameCount()";