Skip to main content
diff options
authorDavid Pursehouse2020-01-27 00:47:05 +0000
committerMatthias Sohn2020-01-27 13:40:08 +0000
commit4cc13297ccf1fa3e982bbb5638162b3bad63f93c (patch)
tree3f0b0c0aead716773d569e0b2eb1efb3b6f02081 /org.eclipse.jgit.http.server
parent0e4a717870f64e667e657650f12e93d477d369c3 (diff)
ErrorProne: Enable and fix UnusedException check
Enable UnusedException at ERROR level which causes the build to fail in many places with: [UnusedException] This catch block catches an symbol and re-throws another, but swallows the caught symbol rather than setting it as a cause. This can make debugging harder. Fix it by setting the caught exception as cause on the subsequently thrown exception. Note: The grammatically incorrect error message is copy-pasted as-is from the version of ErrorProne currently used in Bazel; it has been fixed by [1] in the latest version. [1] Change-Id: I11ed38243091fc12f64f1b2db404ba3f1d2e98b5 Signed-off-by: David Pursehouse <> Signed-off-by: Matthias Sohn <>
Diffstat (limited to 'org.eclipse.jgit.http.server')
1 files changed, 2 insertions, 1 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/
index 9b17132d0a..1769832fba 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/
@@ -298,7 +298,8 @@ public class GitFilter extends MetaFilter {
try {
return StringUtils.toBoolean(n);
} catch (IllegalArgumentException err) {
- throw new ServletException(MessageFormat.format(HttpServerText.get().invalidBoolean, param, n));
+ throw new ServletException(MessageFormat.format(
+ HttpServerText.get().invalidBoolean, param, n), err);

Back to the top