diff options
author | yunqin <yunqin@google.com> | 2019-12-13 14:31:08 -0800 |
---|---|---|
committer | Kurt Alfred Kluever <kak@google.com> | 2019-12-16 10:11:06 -0500 |
commit | 4a8736f0f75a631c7d8620cf413aaa523307b62a (patch) | |
tree | def0ba1e211a9215fbcd995243fea0bd179b7bf5 | |
parent | 801056fe91e6bd4b4d9408d888f668ec4d3e4318 (diff) | |
download | auto-4a8736f0f75a631c7d8620cf413aaa523307b62a.tar.gz |
Suggest calling out a misuse in AutoValue regarding @Nullable fields.
This was identified as an AI in mini-PM for b/142561228.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=285472669
-rw-r--r-- | value/userguide/howto.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/value/userguide/howto.md b/value/userguide/howto.md index b861c609..45de07b9 100644 --- a/value/userguide/howto.md +++ b/value/userguide/howto.md @@ -102,6 +102,9 @@ public abstract class Foo { This example also shows annotating the corresponding `create` parameter with `@Nullable`. AutoValue does not actually require this annotation, only the one on the accessor, but we recommended it as useful documentation to your caller. +Conversely, if `@Nullable` is only added to the parameter in `create` (or +similarly the setter method of [AutoValue.Builder](go/autovalue/builders)), but +not the corresponding accessor method, it won't have any effect. ## <a name="validate"></a>... perform other validation? |