File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/main/java/com/adobe/epubcheck/util Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 8484 <dependency >
8585 <groupId >org.apache.commons</groupId >
8686 <artifactId >commons-compress</artifactId >
87- <version >1.21 </version >
87+ <version >1.28.0 </version >
8888 <exclusions >
8989 <exclusion >
9090 <groupId >org.tukaani</groupId >
Original file line number Diff line number Diff line change 22
33import org .apache .commons .compress .archivers .zip .ZipArchiveEntry ;
44import org .apache .commons .compress .archivers .zip .ZipArchiveOutputStream ;
5+ import org .apache .commons .compress .archivers .zip .ZipArchiveOutputStream .UnicodeExtraFieldPolicy ;
6+ import org .apache .commons .compress .archivers .zip .ZipExtraField ;
57
68import java .io .File ;
79import java .io .FileInputStream ;
@@ -92,6 +94,7 @@ public void createArchive()
9294
9395 out = new ZipArchiveOutputStream (epubFile );
9496 out .setEncoding ("UTF-8" );
97+ out .setCreateUnicodeExtraFields (UnicodeExtraFieldPolicy .NEVER );
9598
9699 for (int i = 0 ; i < paths .size (); i ++)
97100 {
@@ -101,6 +104,7 @@ public void createArchive()
101104 entry .setMethod (ZipArchiveEntry .STORED );
102105 entry .setSize (getSize (paths .get (i )));
103106 entry .setCrc (getCRC (paths .get (i )));
107+ entry .setExtraFields (new ZipExtraField [] {});
104108 }
105109 else
106110 {
@@ -210,7 +214,7 @@ private long getCRC(String path)
210214 cis .close ();
211215 }
212216 }
213- return cis .getChecksum ().getValue ();
217+ return ( cis != null )? cis .getChecksum ().getValue (): 0L ;
214218 }
215219
216220 // public void createArchiveOld() {
You can’t perform that action at this time.
0 commit comments