Check noJdkZlibEncoder before comparing other parameters
.. for consistency
This commit is contained in:
parent
239371abaf
commit
de6e73e3ea
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user