You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2023/05/30 08:29:53 UTC
[lucene] branch main updated: Don't generate stacktrace for TimeExceededException (#12335)
This is an automated email from the ASF dual-hosted git repository.
javanna pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new 72b91156f3d Don't generate stacktrace for TimeExceededException (#12335)
72b91156f3d is described below
commit 72b91156f3d2049e66a987b9cc435c22d6c9e3af
Author: Luca Cavanna <ja...@apache.org>
AuthorDate: Tue May 30 10:29:46 2023 +0200
Don't generate stacktrace for TimeExceededException (#12335)
The exception is package private and never rethrown, we can avoid
generating a stacktrace for it.
---
.../src/java/org/apache/lucene/search/TimeLimitingBulkScorer.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lucene/core/src/java/org/apache/lucene/search/TimeLimitingBulkScorer.java b/lucene/core/src/java/org/apache/lucene/search/TimeLimitingBulkScorer.java
index 5e33884ea4f..517f0a0e77b 100644
--- a/lucene/core/src/java/org/apache/lucene/search/TimeLimitingBulkScorer.java
+++ b/lucene/core/src/java/org/apache/lucene/search/TimeLimitingBulkScorer.java
@@ -41,6 +41,12 @@ final class TimeLimitingBulkScorer extends BulkScorer {
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;