From 197e46805914dbcb8ac236bd21eb06c581f501b0 Mon Sep 17 00:00:00 2001 From: "copybara-service[bot]" Date: Fri, 8 Nov 2024 14:31:41 +0000 Subject: [PATCH] Latest docs on successful build 6848 auto-pushed to gh-pages --- bugpattern/MissingFail.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bugpattern/MissingFail.md b/bugpattern/MissingFail.md index b5cb8d12c5c..39b6cde5cac 100644 --- a/bugpattern/MissingFail.md +++ b/bugpattern/MissingFail.md @@ -14,7 +14,7 @@ To make changes, edit the @BugPattern annotation or the explanation in docs/bugp _Alternate names: missing-fail_ ## The problem -When testing for exceptions in junit, it is easy to forget the call to `fail()`: +When testing for exceptions in JUnit, it is easy to forget the call to `fail()`: ```java try { @@ -32,7 +32,7 @@ import static org.junit.Assert.fail; try { someOperationThatShouldThrow(); - fail() + fail(); } catch (SomeException expected) { assertThat(expected).hasMessage("Operation failed"); } @@ -97,8 +97,8 @@ characteristics are present: * A field assignment in the catch block. * A call to `assertTrue/False(boolean variable or field)` in the catch block. -* The last statement in the `try` block is an `assert*()` (that is not a noop: - `assertFalse(false)`, `assertTrue(true))` or `Mockito.verify()` call. +* The last statement in the `try` block is an `assert*()` (that is not a + noop): `assertFalse(false)`, `assertTrue(true))` or `Mockito.verify()` call. ## Suppression Suppress false positives by adding the suppression annotation `@SuppressWarnings("MissingFail")` to the enclosing element.