We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ee270f commit 080d1e3Copy full SHA for 080d1e3
1 file changed
extractor/src/main/java/org/schabi/newpipe/extractor/downloader/Request.java
@@ -123,12 +123,10 @@ public Builder url(String url) {
123
* Any default headers that the implementation may have, <b>should</b> be overridden by these.
124
*/
125
public Builder headers(@Nullable Map<String, List<String>> headers) {
126
- if (headers == null) {
127
- this.headers.clear();
128
- return this;
129
- }
130
this.headers.clear();
131
- this.headers.putAll(headers);
+ if (headers != null) {
+ this.headers.putAll(headers);
+ }
132
return this;
133
}
134
0 commit comments