Author: pmouawad
Date: Mon May 1 09:32:04 2017
New Revision: 1793297
URL: http://svn.apache.org/viewvc?rev=1793297&view=rev
Log:
Bug 61056 - HTTP : Support brotli decoding
Fix sonar code smells
Bugzilla Id: 61056
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1793297&r1=1793296&r2=1793297&view=diff
==============================================================================
---
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
(original)
+++
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Mon May 1 09:32:04 2017
@@ -159,14 +159,14 @@ public class HTTPHC4Impl extends HTTPHCA
private static final Logger log =
LoggerFactory.getLogger(HTTPHC4Impl.class);
- private final static InputStreamFactory GZIP = new InputStreamFactory() {
+ private static final InputStreamFactory GZIP = new InputStreamFactory() {
@Override
public InputStream create(final InputStream instream) throws
IOException {
return new GZIPInputStream(instream);
}
};
- private final static InputStreamFactory DEFLATE = new InputStreamFactory()
{
+ private static final InputStreamFactory DEFLATE = new InputStreamFactory()
{
@Override
public InputStream create(final InputStream instream) throws
IOException {
return new DeflateInputStream(instream);
@@ -174,7 +174,7 @@ public class HTTPHC4Impl extends HTTPHCA
};
- private final static InputStreamFactory BROTLI = new InputStreamFactory() {
+ private static final InputStreamFactory BROTLI = new InputStreamFactory() {
@Override
public InputStream create(final InputStream instream) throws
IOException {
return new BrotliInputStream(instream);
@@ -344,13 +344,12 @@ public class HTTPHC4Impl extends HTTPHCA
* @return {@link Lookup}
*/
private static Lookup<InputStreamFactory> createLookupRegistry() {
- Registry<InputStreamFactory> registry =
+ return
RegistryBuilder.<InputStreamFactory>create()
.register("gzip", GZIP)
.register("br", BROTLI)
.register("x-gzip", GZIP)
.register("deflate", DEFLATE).build();
- return registry;
}
/**