| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 return job; | 175 return job; |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 private static class DownloadJob | 179 private static class DownloadJob |
| 180 { | 180 { |
| 181 private final URL url; | 181 private final URL url; |
| 182 private final String id; | 182 private final String id; |
| 183 private final HashMap<String, String> headers = new HashMap<>(); | 183 private final HashMap<String, String> headers = new HashMap<>(); |
| 184 | 184 |
| 185 private int responseCode = 0; | 185 private int responseCode; |
|
diegocarloslima
2018/05/10 13:41:58
No need to initialize it with 0 here, this is done
jens
2018/05/15 09:17:02
Acknowledged.
| |
| 186 private final HashMap<String, String> responseHeaders = new HashMap<>(); | 186 private final HashMap<String, String> responseHeaders = new HashMap<>(); |
| 187 private String responseText = null; | 187 private String responseText; |
| 188 | 188 |
| 189 DownloadJob(final URL url, final String id, final Map<String, String> header s) | 189 DownloadJob(final URL url, final String id, final Map<String, String> header s) |
| 190 { | 190 { |
| 191 this.url = url; | 191 this.url = url; |
| 192 this.id = id; | 192 this.id = id; |
| 193 if (headers != null) | 193 if (headers != null) |
| 194 { | 194 { |
| 195 this.headers.putAll(headers); | 195 this.headers.putAll(headers); |
| 196 } | 196 } |
| 197 } | 197 } |
| 198 } | 198 } |
| 199 } | 199 } |
| LEFT | RIGHT |