Merge "crafting-changes: Add some info on Optional/Nullable" into stable-3.1

This commit is contained in:
Edwin Kempin
2021-02-17 07:24:03 +00:00
committed by Gerrit Code Review

View File

@@ -159,6 +159,9 @@ run `./tools/setup_gjf.sh` to download a local copy and set up a
wrapper script. If you run your own copy, please use the same version,
as there may be slight differences between versions.
[[code-rules]]
== Code Rules
=== Final
When to use `final` modifier and when not (in new code):
Always:
@@ -180,6 +183,12 @@ Never:
be removed
* method parameters: similar to local variables
=== Optional / Nullable
Recommended:
* Optionals in arguments are discouraged (use @Nullable instead)
* Return types should be objects or Optionals of objects, but not null/nullable
[[code-organization]]
== Code Organization