diff --git a/codec/src/main/java/io/netty/handler/codec/compression/ZlibCodecFactory.java b/codec/src/main/java/io/netty/handler/codec/compression/ZlibCodecFactory.java index 4c1fcd755b..4641cf1657 100644 --- a/codec/src/main/java/io/netty/handler/codec/compression/ZlibCodecFactory.java +++ b/codec/src/main/java/io/netty/handler/codec/compression/ZlibCodecFactory.java @@ -90,9 +90,8 @@ public final class ZlibCodecFactory { } public static ZlibEncoder newZlibEncoder(int compressionLevel, int windowBits, int memLevel, byte[] dictionary) { - if (PlatformDependent.javaVersion() < 7 || - windowBits != DEFAULT_JDK_WINDOW_SIZE || memLevel != DEFAULT_JDK_MEM_LEVEL || - noJdkZlibEncoder) { + if (PlatformDependent.javaVersion() < 7 || noJdkZlibEncoder || + windowBits != DEFAULT_JDK_WINDOW_SIZE || memLevel != DEFAULT_JDK_MEM_LEVEL) { return new JZlibEncoder(compressionLevel, windowBits, memLevel, dictionary); } else { return new JdkZlibEncoder(compressionLevel, dictionary);