summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2021-11-01 00:53:10 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2021-11-16 11:45:57 +0100
commitee28780bf2dfe8574905835d43b5bb0738ad81ad (patch)
tree2626b8986ec1de6ad2f59c2b6d7be4e325226733 /org.eclipse.jgit
parent78b7d9e4fa1bdd3ba27b39190b45f7bdf0b61fff (diff)
downloadjgit-ee28780bf2dfe8574905835d43b5bb0738ad81ad.tar.gz
jgit-ee28780bf2dfe8574905835d43b5bb0738ad81ad.zip
Make BinaryBlobException stackless
We use BinaryBlobException to signal a binary blob was found and never make use of its stack trace. Suppress filling in the stack trace to avoid the performance penalty coming with that. See https://shipilev.net/blog/2014/exceptional-performance/ Change-Id: Iae1f1c19a1fa8aef4f6569822557171130299958
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java
index 58a121403f..768931ca0b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/BinaryBlobException.java
@@ -22,4 +22,9 @@ public class BinaryBlobException extends Exception {
* Construct a BinaryBlobException.
*/
public BinaryBlobException() {}
+
+ @Override
+ public synchronized Throwable fillInStackTrace() {
+ return this;
+ }
}