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 committed May 30, 2023
1 parent af243dc commit 24df30c
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 24df30c

Please sign in to comment.