소스 검색

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>
tags/v5.1.0.201808281540-m3
David Pursehouse 5 년 전
부모
커밋
4c29736a3e
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3
    0
      pom.xml

+ 3
- 0
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>

Loading…
취소
저장