Skip to content

Commit

Permalink
Don't generate stacktrace in CollectionTerminatedException
Browse files Browse the repository at this point in the history
Seems this exception is always ignored so there's no point in filling
in a stack-trace for it.
  • Loading branch information
original-brownbear committed May 7, 2023
1 parent 397c2e5 commit 6ee9e01
Showing 1 changed file with 6 additions and 0 deletions.
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 6ee9e01

Please sign in to comment.