diff options
author | cparsons <cparsons@google.com> | 2018-04-02 12:26:54 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-02 12:28:22 -0700 |
commit | 41f7df715e83ddaf5a75b5738587c9d842ec75b4 (patch) | |
tree | 8636aee71317d8b77d14704af5078f7378dc6b75 /src/main/java/com/google/devtools | |
parent | ebadafcf9dd10373f59eb490dc0b6df22e4bd136 (diff) |
Add noneable=true to several parameters of list and dict methods
RELNOTES: None.
PiperOrigin-RevId: 191329591
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java | 2 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java index 1cb04977f1..6f5c2ef751 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkDict.java @@ -101,7 +101,7 @@ public final class SkylarkDict<K, V> extends MutableMap<K, V> + "If entry with that key was found, return the specified <code>default</code> value;" + "if no default value was specified, fail instead.", parameters = { - @Param(name = "key", type = Object.class, doc = "The key."), + @Param(name = "key", type = Object.class, doc = "The key.", noneable = true), @Param(name = "default", type = Object.class, defaultValue = "unbound", named = true, noneable = true, doc = "a default value if the key is absent."), }, diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java index ebe9cf52bf..50589dc59a 100644 --- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java +++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java @@ -517,7 +517,10 @@ public abstract class SkylarkList<E> extends BaseMutableList<E> name = "append", doc = "Adds an item to the end of the list.", parameters = { - @Param(name = "item", type = Object.class, doc = "Item to add at the end.") + @Param(name = "item", + type = Object.class, + doc = "Item to add at the end.", + noneable = true) }, useLocation = true, useEnvironment = true @@ -534,7 +537,7 @@ public abstract class SkylarkList<E> extends BaseMutableList<E> doc = "Inserts an item at a given position.", parameters = { @Param(name = "index", type = Integer.class, doc = "The index of the given position."), - @Param(name = "item", type = Object.class, doc = "The item.") + @Param(name = "item", type = Object.class, doc = "The item.", noneable = true) }, useLocation = true, useEnvironment = true |