Browse Source

bz-62686 Correctly handle compression level changes in ZipOutputStream

master
Jaikiran Pai 6 years ago
parent
commit
c07bd86684
2 changed files with 8 additions and 1 deletions
  1. +4
    -0
      WHATSNEW
  2. +4
    -1
      src/main/org/apache/tools/zip/ZipOutputStream.java

+ 4
- 0
WHATSNEW View File

@@ -12,6 +12,10 @@ Fixed bugs:
instead of a IllegalStateException in the absence of the "id" attribute. instead of a IllegalStateException in the absence of the "id" attribute.
Bugzilla Report 62655 Bugzilla Report 62655


* org.apache.tools.zip.ZipOutputStream would sometimes potentially use
an incorrect compression level for a zip entry. This is now fixed.
Bugzilla Report 62686

Other changes: Other changes:
-------------- --------------
* generatekey task now supports SubjectAlternativeName during key * generatekey task now supports SubjectAlternativeName during key


+ 4
- 1
src/main/org/apache/tools/zip/ZipOutputStream.java View File

@@ -867,7 +867,10 @@ public class ZipOutputStream extends FilterOutputStream {
throw new IllegalArgumentException("Invalid compression level: " throw new IllegalArgumentException("Invalid compression level: "
+ level); + level);
} }
hasCompressionLevelChanged = (this.level != level);
if (this.level == level) {
return;
}
hasCompressionLevelChanged = true;
this.level = level; this.level = level;
} }




Loading…
Cancel
Save