Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 14301 invoked by uid 500); 3 Feb 2003 15:43:58 -0000 Received: (qmail 14296 invoked from network); 3 Feb 2003 15:43:57 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 3 Feb 2003 15:43:57 -0000 Received: (qmail 83198 invoked by uid 1146); 3 Feb 2003 15:43:57 -0000 Date: 3 Feb 2003 15:43:57 -0000 Message-ID: <20030203154357.83197.qmail@icarus.apache.org> From: bodewig@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Jar.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N bodewig 2003/02/03 07:43:57 Modified: src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH Jar.java Log: merge from HEAD Revision Changes Path No revision No revision 1.51.2.13 +10 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java Index: Jar.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Jar.java,v retrieving revision 1.51.2.12 retrieving revision 1.51.2.13 diff -u -r1.51.2.12 -r1.51.2.13 --- Jar.java 17 Jan 2003 12:50:28 -0000 1.51.2.12 +++ Jar.java 3 Feb 2003 15:43:57 -0000 1.51.2.13 @@ -167,8 +167,9 @@ public void setDestFile(File jarFile) { super.setDestFile(jarFile); if (jarFile.exists()) { + ZipFile zf = null; try { - ZipFile zf = new ZipFile(jarFile); + zf = new ZipFile(jarFile); // must not use getEntry as "well behaving" applications // must accept the manifest in any capitalization @@ -184,6 +185,14 @@ } catch (Throwable t) { log("error while reading original manifest: " + t.getMessage(), Project.MSG_WARN); + } finally { + if (zf != null) { + try { + zf.close(); + } catch (IOException e) { + // XXX - log an error? throw an exception? + } + } } } }