Skip to content

Commit

Permalink
Demonstrate that NullableVoid already handles @Nullable on constr…
Browse files Browse the repository at this point in the history
…uctors.

PiperOrigin-RevId: 656131718
  • Loading branch information
cpovirk authored and Error Prone Team committed Jul 26, 2024
1 parent bfe69f8 commit 502d8ba
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ public void positive() {
.doTest();
}

@Test
public void positiveConstructor() {
compilationHelper
.addSourceLines(
"Test.java",
"import javax.annotation.Nullable;",
"class Test {",
" // BUG: Diagnostic contains:",
" @Nullable Test() {}",
"}")
.doTest();
}

@Test
public void positiveCheckForNull() {
compilationHelper
Expand Down

0 comments on commit 502d8ba

Please sign in to comment.