Skip to content

Commit 9120c3e

Browse files
garyrussellartembilan
authored andcommitted
GH-1320: AlwaysDecompress true in DelegatingDecomp
Resolves #1320 **cherry-pick to 2.2.x**
1 parent e190e53 commit 9120c3e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

spring-amqp/src/main/java/org/springframework/amqp/support/postprocessor/DelegatingDecompressingPostProcessor.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2020 the original author or authors.
2+
* Copyright 2014-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -38,10 +38,14 @@ public class DelegatingDecompressingPostProcessor implements MessagePostProcesso
3838

3939
private int order;
4040

41+
/**
42+
* Construct an instance with the default decompressors (gzip, zip, deflate) with
43+
* the alwaysDecompress flag set to true.
44+
*/
4145
public DelegatingDecompressingPostProcessor() {
42-
this.decompressors.put("gzip", new GUnzipPostProcessor());
43-
this.decompressors.put("zip", new UnzipPostProcessor());
44-
this.decompressors.put("deflate", new InflaterPostProcessor());
46+
this.decompressors.put("gzip", new GUnzipPostProcessor(true));
47+
this.decompressors.put("zip", new UnzipPostProcessor(true));
48+
this.decompressors.put("deflate", new InflaterPostProcessor(true));
4549
}
4650

4751
@Override

0 commit comments

Comments
 (0)