Issue-52: Refactoring and adding unit tests to cover the compression functionality

This commit is contained in:
Jason Erickson 2015-09-23 17:24:47 -07:00
parent 806844a89a
commit 7e15e2de02
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ public class DefaultCompressionCodecResolver implements CompressionCodecResolver
throw new CompressionException("Unsupported compression algorithm '" + cmpAlg + "'");
}
protected final String getAlgorithmFromHeader(Header header) {
private String getAlgorithmFromHeader(Header header) {
Assert.notNull(header, "header cannot be null.");
return header.getCompressionAlgorithm();

View File

@ -415,7 +415,7 @@ class JwtsTest {
def jws = Jwts.parser().setSigningKey(key).setCompressionCodecResolver(new DefaultCompressionCodecResolver() {
@Override
CompressionCodec resolveCompressionCodec(Header header) {
String algorithm = getAlgorithmFromHeader(header);
String algorithm = header.getCompressionAlgorithm()
if ("CUSTOM".equals(algorithm)) {
return CompressionCodecs.GZIP
} else {