Use `@Nullable` instead of `@CheckForNull`.

We'd been using the latter to work around a bug in Kotlin, but that bug was fixed in 1.8.20, and Google has on that version (or later) for a while.

(I think the bug is the flip side of [KT-57996](https://youtrack.jetbrains.com/issue/KT-57996/Usages-of-Foo-Nullable-produce-only-warnings-even-with-Xtype-enhancement-improvements-strict-mode-Xjspecify-annotationsstrict): In KT-57996, Kotlin didn't know that an annotated array was nullable, so it didn't produce the expected warning/error until 1.8.20. Here, Kotlin didn't know that an annotated array was nullable, so it prevented callers from passing null until 1.8.20.)

If Truth users outside Google are still using 1.8.20, they might be affected; I'm not completely sure. It might depend on whether they set `-Xtype-enhancement-improvements-strict-mode`??

RELNOTES=n/a
PiperOrigin-RevId: 532397177
1 file changed
tree: 3a1df7bffbb6329551276662b3b3923d792ccf28
  1. .github/
  2. core/
  3. extensions/
  4. refactorings/
  5. util/
  6. .gitignore
  7. CONTRIBUTING.md
  8. LICENSE
  9. overview.html
  10. pom.xml
  11. README.md
README.md

Main Site Build Status Maven Release Stackoverflow

What is Truth?

Truth makes your test assertions and failure messages more readable. Similar to AssertJ, it natively supports many JDK and Guava types, and it is extensible to others.

Truth is owned and maintained by the Guava team. It is used in the majority of the tests in Google’s own codebase.

Read more at the main website.