Skip to content

Commit fe513c6

Browse files
committed
Fixed java 8 compile issue MegatronKing#12
1 parent dcf6031 commit fe513c6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎stringfog-gradle-plugin/src/main/java/com/github/megatronking/stringfog/plugin/StringFogClassInjector.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ private void processJar(File jarIn, File jarOut, String key, Charset charsetIn,
8282
final String entryName = entryIn.getName();
8383
if (!processedEntryNamesMap.containsKey(entryName)) {
8484
ZipEntry entryOut = new ZipEntry(entryIn);
85+
// Set compress method to default, fixed #12
86+
if (entryOut.getMethod() != ZipEntry.DEFLATED) {
87+
entryOut.setMethod(ZipEntry.DEFLATED);
88+
}
8589
entryOut.setCompressedSize(-1);
8690
zos.putNextEntry(entryOut);
8791
if (!entryIn.isDirectory()) {

0 commit comments

Comments
 (0)