Code improvement
This commit is contained in:
parent
4ee270fe01
commit
080d1e318d
1 changed files with 3 additions and 5 deletions
|
@ -123,12 +123,10 @@ public class Request {
|
|||
* Any default headers that the implementation may have, <b>should</b> be overridden by these.
|
||||
*/
|
||||
public Builder headers(@Nullable Map<String, List<String>> headers) {
|
||||
if (headers == null) {
|
||||
this.headers.clear();
|
||||
return this;
|
||||
}
|
||||
this.headers.clear();
|
||||
this.headers.putAll(headers);
|
||||
if (headers != null) {
|
||||
this.headers.putAll(headers);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue