Skip to content

Commit

Permalink
Don't generate stacktrace in CollectionTerminatedException (#12270)
Browse files Browse the repository at this point in the history
CollectionTerminatedException is always caught and never exposed to users so there's no point in filling
in a stack-trace for it.
  • Loading branch information
original-brownbear authored and javanna committed May 9, 2023
1 parent 15568ca commit ae305f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Improvements

Optimizations
---------------------
(No changes)

* GITHUB#12270 Don't generate stacktrace in CollectionTerminatedException. (Armin Braun)

Bug Fixes
---------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@ public final class CollectionTerminatedException extends RuntimeException {
public CollectionTerminatedException() {
super();
}

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

0 comments on commit ae305f8

Please sign in to comment.