Skip to content

Commit

Permalink
Document maps don't allow null anywhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Mar 15, 2016
1 parent 7889700 commit 10ff3d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions retrofit/src/main/java/retrofit2/http/FieldMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
/**
* Named key/value pairs for a form-encoded request.
* <p>
* Field values may be {@code null} which will omit them from the request body.
* <p>
* Simple Example:
* <pre>{@code
* &#64;FormUrlEncoded
Expand All @@ -35,6 +33,8 @@
* }</pre>
* Calling with {@code foo.things(ImmutableMap.of("foo", "bar", "kit", "kat")} yields a request
* body of {@code foo=bar&kit=kat}.
* <p>
* A {@code null} value for the map, as a key, or as a value is not allowed.
*
* @see FormUrlEncoded
* @see Field
Expand Down
2 changes: 2 additions & 0 deletions retrofit/src/main/java/retrofit2/http/PartMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
* &#64;Part("file") RequestBody file,
* &#64;PartMap Map&lt;String, RequestBody&gt; params);
* }</pre>
* <p>
* A {@code null} value for the map, as a key, or as a value is not allowed.
*
* @see Multipart
* @see Part
Expand Down
6 changes: 3 additions & 3 deletions retrofit/src/main/java/retrofit2/http/QueryMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
/**
* Query parameter keys and values appended to the URL.
* <p>
* Both keys and values are converted to strings using {@link String#valueOf(Object)}. Values are
* URL encoded and {@code null} will not include the query parameter in the URL. {@code null} keys
* are not allowed.
* Both keys and values are converted to strings using {@link String#valueOf(Object)}.
* <p>
* Simple Example:
* <pre>{@code
Expand All @@ -45,6 +43,8 @@
* }</pre>
* Calling with {@code foo.list(ImmutableMap.of("foo", "foo+bar"))} yields
* {@code /search?foo=foo+bar}.
* <p>
* A {@code null} value for the map, as a key, or as a value is not allowed.
*
* @see Query
*/
Expand Down

0 comments on commit 10ff3d9

Please sign in to comment.