Skip to content

Commit

Permalink
Don't generate stacktrace for TimeExceededException (#12335)
Browse files Browse the repository at this point in the history
The exception is package private and never rethrown, we can avoid
generating a stacktrace for it.
  • Loading branch information
javanna authored May 30, 2023
1 parent d1850e4 commit 72b9115
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ static class TimeExceededException extends RuntimeException {
private TimeExceededException() {
super("TimeLimit Exceeded");
}

@Override
public Throwable fillInStackTrace() {
// never re-thrown so we can save the expensive stacktrace
return this;
}
}

private final BulkScorer in;
Expand Down

0 comments on commit 72b9115

Please sign in to comment.