summaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-07-17 10:43:04 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2018-07-23 07:14:00 +0100
commit4c29736a3e1d4fb94f11c424488b831a1f062e0b (patch)
treebcc0928fc54dd4aba8b775e9df886b34cf024de8 /pom.xml
parent280707b0fc717fdd8898242f21589f0c7c7d87be (diff)
downloadjgit-4c29736a3e1d4fb94f11c424488b831a1f062e0b.tar.gz
jgit-4c29736a3e1d4fb94f11c424488b831a1f062e0b.zip
ErrorProne: Enable check for misuse of ExpectedException
Any additional statements after the statement that is expected to throw will never be executed in a passing test. This can lead to inappropriately passing tests where later incorrect assertions are skipped by the thrown exception. See [1] for examples. There are no cases of this in the code base, but by enabling the checker with severity ERROR we can ensure that we don't overlook any future misuse of ExpectedException. [1] http://errorprone.info/bugpattern/ExpectedExceptionChecker Change-Id: I266d4f73f6075bfc1e39fa3d8aee7dee96db61b9 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml3
1 files changed, 3 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 2758844ff0..61869ff43f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -772,6 +772,9 @@
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
+ <compilerArgs>
+ <arg>-Xep:ExpectedExceptionChecker:ERROR</arg>
+ </compilerArgs>
<excludes>
<exclude>org/eclipse/jgit/transport/InsecureCipherFactory.java</exclude>
</excludes>