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
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 58a1214..768931c 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; + } }