java.md: Update @Nullable section to mention NullAway migration
Change-Id: Ibda8d853d7509cf9b74d67acc13a59d33f6b544a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6214155 Auto-Submit: Andrew Grieve <agrieve@chromium.org> Reviewed-by: Mohamed Heikal <mheikal@chromium.org> Commit-Queue: Mohamed Heikal <mheikal@chromium.org> Cr-Commit-Position: refs/heads/main@{#1413130}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
0eb2b46b81
commit
506d5626cb
@ -233,8 +233,8 @@ to ensure in debug builds and tests that `destroy()` is called.
|
||||
## Nullability Annotations
|
||||
|
||||
A migration to add `@NullMarked` to all Java files is currently underway
|
||||
([crbug.com/389129271]). See [nullaway.md] for how to `@Nullable` and related
|
||||
annotations.
|
||||
([crbug.com/389129271]). See [nullaway.md] for how to use `@Nullable` and
|
||||
related annotations.
|
||||
|
||||
[crbug.com/389129271]: https://crbug.com/389129271
|
||||
[nullaway.md]: nullaway.md
|
||||
@ -302,9 +302,9 @@ private static List<String> readLines(BufferedReader bufferedReader) {
|
||||
* Use them liberally. They are [documented here](https://developer.android.com/studio/write/annotations).
|
||||
* They generally improve readability.
|
||||
* Many make lint more useful.
|
||||
* `javax.annotation.Nullable` vs `androidx.annotation.Nullable`
|
||||
* Always prefer `androidx.annotation.Nullable`.
|
||||
* It uses `@Retention(SOURCE)` rather than `@Retention(RUNTIME)`.
|
||||
* What about `androidx.annotation.Nullable`?
|
||||
* We are migrating away from it (see [nullaway.md]).
|
||||
* Keep using it in files that have not yet been migrated.
|
||||
|
||||
#### IntDefs {#intdefs}
|
||||
|
||||
|
Reference in New Issue
Block a user