Skip to content

Commit

Permalink
Stylistic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oxkitsune committed Jun 20, 2022
1 parent 5399ef4 commit 804bebd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
import com.google.errorprone.matchers.Matchers;
import com.sun.source.tree.MethodInvocationTree;

/**
* A {@link BugChecker} which flags {@code asserThat(someValue).isEqualTo(null)} for further
* simplification
*/
/** A {@link BugChecker} which flags {@code Assert.isEqualTo(null)} for further simplification */
@AutoService(BugChecker.class)
@BugPattern(
name = "AssertThatIsNullUsage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
final class AssertThatIsNullUsageCheckTest {
private final CompilationTestHelper compilationTestHelper =
CompilationTestHelper.newInstance(AssertThatIsNullUsageCheck.class, getClass());

private final BugCheckerRefactoringTestHelper refactoringTestHelper =
BugCheckerRefactoringTestHelper.newInstance(AssertThatIsNullUsageCheck.class, getClass());

Expand All @@ -25,10 +24,10 @@ void identification() {
" String nullValue = null;",
" assertThat(12).isEqualTo(12);",
" // BUG: Diagnostic contains: assertThat(...).isNull()",
" assertThat(\"value\").isEqualTo(null);",
" assertThat(\"foo\").isEqualTo(null);",
" // BUG: Diagnostic contains: assertThat(...).isNull()",
" assertThat(nullValue).isEqualTo(null);",
" isEqualTo(\"foo\");",
" isEqualTo(\"bar\");",
" isEqualTo(null);",
" }",
"",
Expand All @@ -52,9 +51,9 @@ void replacement() {
" public void testAssertThat() {",
" String nullValue = null;",
" assertThat(12).isEqualTo(12);",
" assertThat(\"value\").isEqualTo(null);",
" assertThat(\"foo\").isEqualTo(null);",
" assertThat(nullValue).isEqualTo(null);",
" isEqualTo(\"foo\");",
" isEqualTo(\"bar\");",
" isEqualTo(null);",
" }",
"",
Expand All @@ -72,9 +71,9 @@ void replacement() {
" public void testAssertThat() {",
" String nullValue = null;",
" assertThat(12).isEqualTo(12);",
" assertThat(\"value\").isNull();",
" assertThat(\"foo\").isNull();",
" assertThat(nullValue).isNull();",
" isEqualTo(\"foo\");",
" isEqualTo(\"bar\");",
" isEqualTo(null);",
" }",
"",
Expand Down

0 comments on commit 804bebd

Please sign in to comment.