Changeset 18332 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2021-12-20T14:12:10+01:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/HttpClient.java
r18211 r18332 379 379 * @see HttpURLConnection#getErrorStream() 380 380 */ 381 @SuppressWarnings("resource") 381 @SuppressWarnings({"resource", 382 /* All 4 `InputStream in` reassignments would close the original when the returned stream is closed */ 383 "PMD.CloseResource"}) 382 384 public final InputStream getContent() throws IOException { 383 InputStream in = getInputStream(); 384 in = new ProgressInputStream(in, getContentLength(), monitor); 385 in = "gzip".equalsIgnoreCase(getContentEncoding()) 386 ? new GZIPInputStream(in) 387 : "deflate".equalsIgnoreCase(getContentEncoding()) 388 ? new InflaterInputStream(in) 389 : in; 385 InputStream in = new ProgressInputStream(getInputStream(), getContentLength(), monitor); 386 if ("gzip".equalsIgnoreCase(getContentEncoding())) { 387 in = new GZIPInputStream(in); 388 } else if ("deflate".equalsIgnoreCase(getContentEncoding())) { 389 in = new InflaterInputStream(in); 390 } 390 391 Compression compression = Compression.NONE; 391 392 if (uncompress) {
Note:
See TracChangeset
for help on using the changeset viewer.