Repository: ant Updated Branches: refs/heads/master debd9484f -> 38fed1a2f
Java8 refactoring made createEmptyZip ignore skipWriting flag Project: http://git-wip-us.apache.org/repos/asf/ant/repo Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/4cacf923 Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/4cacf923 Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/4cacf923 Branch: refs/heads/master Commit: 4cacf92330dc87847fed03e0d2f9a9a5a6c8b89e Parents: debd948 Author: Stefan Bodewig <bode...@apache.org> Authored: Sat Feb 10 18:57:32 2018 +0100 Committer: Stefan Bodewig <bode...@apache.org> Committed: Sat Feb 10 18:58:18 2018 +0100 ---------------------------------------------------------------------- src/main/org/apache/tools/ant/taskdefs/Jar.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ant/blob/4cacf923/src/main/org/apache/tools/ant/taskdefs/Jar.java ---------------------------------------------------------------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/Jar.java b/src/main/org/apache/tools/ant/taskdefs/Jar.java index f105cb4..73a871f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Jar.java +++ b/src/main/org/apache/tools/ant/taskdefs/Jar.java @@ -859,7 +859,7 @@ public class Jar extends Zip { if (!skipWriting) { log("Building MANIFEST-only jar: " + getDestFile().getAbsolutePath()); - } + try (ZipOutputStream zOut = new ZipOutputStream(getDestFile())) { zOut.setEncoding(getEncoding()); zOut.setUseZip64(getZip64Mode().getMode()); @@ -877,6 +877,7 @@ public class Jar extends Zip { } finally { createEmpty = false; } + } return true; }