Skip to content

Commit

Permalink
Don't generate stacktrace in CollectionTerminatedException (apache#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 alessandrobenedetti committed May 12, 2023
1 parent ab643b7 commit 815e840
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lucene/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Optimizations

* GITHUB#12160: Concurrent rewrite for AbstractKnnVectorQuery. (Kaival Parikh)

* 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 815e840

Please sign in to comment.