Browse Source

Java8 refactoring made createEmptyZip ignore skipWriting flag

master
Stefan Bodewig 7 years ago
parent
commit
4cacf92330
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/org/apache/tools/ant/taskdefs/Jar.java

+ 2
- 1
src/main/org/apache/tools/ant/taskdefs/Jar.java View File

@@ -859,7 +859,7 @@ public class Jar extends Zip {
if (!skipWriting) { if (!skipWriting) {
log("Building MANIFEST-only jar: " log("Building MANIFEST-only jar: "
+ getDestFile().getAbsolutePath()); + getDestFile().getAbsolutePath());
}
try (ZipOutputStream zOut = new ZipOutputStream(getDestFile())) { try (ZipOutputStream zOut = new ZipOutputStream(getDestFile())) {
zOut.setEncoding(getEncoding()); zOut.setEncoding(getEncoding());
zOut.setUseZip64(getZip64Mode().getMode()); zOut.setUseZip64(getZip64Mode().getMode());
@@ -877,6 +877,7 @@ public class Jar extends Zip {
} finally { } finally {
createEmpty = false; createEmpty = false;
} }
}
return true; return true;
} }




Loading…
Cancel
Save