Browse Source

FileResolverTest#testNotAGitRepository: Fail when exception is not thrown

Error Prone reports:

  Not calling fail() when expecting an exception masks bugs

See https://errorprone.info/bugpattern/MissingFail

Change-Id: I9ac844aa6c5a620d9b5d21d2e242347b3788b96a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.2
David Pursehouse 6 years ago
parent
commit
873b0b7754
  1. 1
      org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java

1
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java

@ -147,6 +147,7 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase {
try { try {
resolver.open(null, name); resolver.open(null, name);
fail("opened non-git repository");
} catch (RepositoryNotFoundException e) { } catch (RepositoryNotFoundException e) {
assertEquals("repository not found: " + name, e.getMessage()); assertEquals("repository not found: " + name, e.getMessage());

Loading…
Cancel
Save