crafting-changes: Add some info on Optional/Nullable
Patrick shared these guidelines in a review and I thought it might help
to have them in the docs.
Change-Id: I7d9287e777b71524992a19da410d220aeb976ccd
diff --git a/Documentation/dev-crafting-changes.txt b/Documentation/dev-crafting-changes.txt
index d71d227..3be9472 100644
--- a/Documentation/dev-crafting-changes.txt
+++ b/Documentation/dev-crafting-changes.txt
@@ -159,6 +159,9 @@
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 @@
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