Skip to content

Commit

Permalink
fix checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
raccoonback committed Dec 28, 2024
1 parent 5fc7f90 commit 6c697f2
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
*/
package reactor.netty.http.server;

import java.util.ArrayList;
import java.util.List;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
Expand All @@ -33,9 +36,6 @@
import io.netty.util.ReferenceCountUtil;
import io.netty.util.internal.ObjectUtil;

import java.util.ArrayList;
import java.util.List;

/**
* {@link HttpContentCompressor} to enable on-demand compression.
*
Expand All @@ -46,22 +46,22 @@ final class SimpleCompressionHandler extends HttpContentCompressor {
boolean decoded;
HttpRequest request;

private SimpleCompressionHandler(CompressionOptions ... options) {
private SimpleCompressionHandler(CompressionOptions... options) {
super(options);
}

static SimpleCompressionHandler create(int compressionLevel) {
ObjectUtil.checkInRange(compressionLevel, 0, 9, "compressionLevel");

List<CompressionOptions> options = new ArrayList<>();
List<CompressionOptions> options = new ArrayList<>();
options.add(StandardCompressionOptions.gzip(compressionLevel, 15, 8));
options.add(StandardCompressionOptions.deflate(compressionLevel, 15, 8));
options.add(StandardCompressionOptions.snappy());

if(Zstd.isAvailable()) {
if (Zstd.isAvailable()) {
options.add(StandardCompressionOptions.zstd(compressionLevel, 15, 8));
}
if(Brotli.isAvailable()) {
if (Brotli.isAvailable()) {
options.add(StandardCompressionOptions.brotli());
}

Expand Down

0 comments on commit 6c697f2

Please sign in to comment.