Check noJdkZlibEncoder before comparing other parameters

.. for consistency
This commit is contained in:
Trustin Lee 2014-08-26 16:11:45 +09:00
parent 239371abaf
commit de6e73e3ea

View File

@ -90,9 +90,8 @@ public final class ZlibCodecFactory {
} }
public static ZlibEncoder newZlibEncoder(int compressionLevel, int windowBits, int memLevel, byte[] dictionary) { public static ZlibEncoder newZlibEncoder(int compressionLevel, int windowBits, int memLevel, byte[] dictionary) {
if (PlatformDependent.javaVersion() < 7 || if (PlatformDependent.javaVersion() < 7 || noJdkZlibEncoder ||
windowBits != DEFAULT_JDK_WINDOW_SIZE || memLevel != DEFAULT_JDK_MEM_LEVEL || windowBits != DEFAULT_JDK_WINDOW_SIZE || memLevel != DEFAULT_JDK_MEM_LEVEL) {
noJdkZlibEncoder) {
return new JZlibEncoder(compressionLevel, windowBits, memLevel, dictionary); return new JZlibEncoder(compressionLevel, windowBits, memLevel, dictionary);
} else { } else {
return new JdkZlibEncoder(compressionLevel, dictionary); return new JdkZlibEncoder(compressionLevel, dictionary);