|
37 | 37 | import java.util.function.UnaryOperator; |
38 | 38 | import java.util.zip.GZIPInputStream; |
39 | 39 |
|
| 40 | +import org.apache.hc.client5.http.entity.DeflateCompressingEntity; |
40 | 41 | import org.apache.hc.client5.http.entity.DeflateInputStream; |
| 42 | +import org.apache.hc.client5.http.entity.GzipCompressingEntity; |
41 | 43 | import org.apache.hc.core5.annotation.Contract; |
42 | 44 | import org.apache.hc.core5.annotation.Internal; |
43 | 45 | import org.apache.hc.core5.annotation.ThreadingBehavior; |
@@ -72,13 +74,8 @@ private static Map<ContentCoding, Codec> build() { |
72 | 74 | final Map<ContentCoding, Codec> m = new EnumMap<>(ContentCoding.class); |
73 | 75 |
|
74 | 76 | m.put(ContentCoding.GZIP, |
75 | | - new Codec( |
76 | | - org.apache.hc.client5.http.entity.GzipCompressingEntity::new, |
77 | | - ent -> new DecompressingEntity(ent, GZIPInputStream::new))); |
78 | | - m.put(ContentCoding.DEFLATE, |
79 | | - new Codec( |
80 | | - org.apache.hc.client5.http.entity.DeflateCompressingEntity::new, |
81 | | - ent -> new DecompressingEntity(ent, DeflateInputStream::new))); |
| 77 | + new Codec(GzipCompressingEntity::new, ent -> new DecompressingEntity(ent, GZIPInputStream::new))); |
| 78 | + m.put(ContentCoding.DEFLATE, new Codec(DeflateCompressingEntity::new, ent -> new DecompressingEntity(ent, DeflateInputStream::new))); |
82 | 79 |
|
83 | 80 | // 2) Commons-Compress (optional) — reflectively wired |
84 | 81 | if (CommonsCompressSupport.isPresent()) { |
|
0 commit comments