Browse Source

DirCacheBuilderTest#testBuildRejectsUnsetFileMode: Add missing fail()

Error Prone reports:

  Not calling fail() when expecting an exception masks bugs

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

Change-Id: Ic89f9daef3c31bfbfd1f3c003cb90a373cd74847
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.2
David Pursehouse 6 years ago
parent
commit
302717c30b
  1. 1
      org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java

1
org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderTest.java vendored

@ -89,6 +89,7 @@ public class DirCacheBuilderTest extends RepositoryTestCase {
assertEquals(0, e.getRawMode());
try {
b.add(e);
fail("did not reject unset file mode");
} catch (IllegalArgumentException err) {
assertEquals("FileMode not set for path a", err.getMessage());
}

Loading…
Cancel
Save