From 4c29736a3e1d4fb94f11c424488b831a1f062e0b Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 17 Jul 2018 10:43:04 +0900 Subject: [PATCH] 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 --- pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pom.xml b/pom.xml index 2758844ff..61869ff43 100644 --- a/pom.xml +++ b/pom.xml @@ -772,6 +772,9 @@ javac-with-errorprone true + + -Xep:ExpectedExceptionChecker:ERROR + org/eclipse/jgit/transport/InsecureCipherFactory.java