Skip to content

Commit

Permalink
Test case for issue #4889
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst authored Aug 20, 2021
1 parent bf79d96 commit 4480e55
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 4480e55

Please sign in to comment.