Code improvement

This commit is contained in:
TobiGr 2021-04-03 21:04:43 +02:00
parent 4ee270fe01
commit 080d1e318d

View File

@ -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;
}