Skip to content

Commit

Permalink
Merge pull request #63 from gayanW/java-10_62
Browse files Browse the repository at this point in the history
Remove countStackFrames() in StackDepthCheckerTest#testInfiniteRecursion
  • Loading branch information
cyrille-artho authored May 29, 2018
2 parents bd2bc09 + 908306b commit 198420f
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,14 @@ void foo(){
System.out.println(n);

foo();

n--; // not that we ever get here
System.out.print("exited foo() at level ");
System.out.println(n);

// this function never returns
}

@Test
@SuppressWarnings("deprecation")
public void testInfiniteRecursion (){
if (verifyUnhandledException("java.lang.StackOverflowError",
"+listener=.listener.StackDepthChecker", "+sdc.max_stack_depth=42")){
Thread t = Thread.currentThread();
n = t.countStackFrames(); // it's deprecated, but we just want to make the printout more readable
foo();
}
}
Expand Down

0 comments on commit 198420f

Please sign in to comment.