Skip to content

Commit

Permalink
Test case for issue typetools#4889
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst authored and wmdietl committed Sep 4, 2021
1 parent c0e2e57 commit 02338d2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions checker/tests/nullness/Issue4889.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import java.util.Objects;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;

class Issue4889 {
void f(@Nullable String s) {
Objects.toString(s, "").toString();
}

void g(@Nullable String s) {
@NonNull String x = Objects.toString(s, "");
@Nullable String y = Objects.toString(s, null);
}
}

0 comments on commit 02338d2

Please sign in to comment.