Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 49492 invoked from network); 16 Mar 2004 16:01:39 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Mar 2004 16:01:39 -0000 Received: (qmail 81099 invoked by uid 500); 16 Mar 2004 16:01:21 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 81044 invoked by uid 500); 16 Mar 2004 16:01:20 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 80995 invoked from network); 16 Mar 2004 16:01:20 -0000 Received: from unknown (HELO junior.lgc.com) (134.132.72.99) by daedalus.apache.org with SMTP; 16 Mar 2004 16:01:20 -0000 Received: from lgchvw01.lgc.com (lgchvw01.lgc.com [134.132.93.107]) by junior.lgc.com (8.11.7/8.11.3) with SMTP id i2GG0D711644 for ; Tue, 16 Mar 2004 10:00:13 -0600 (CST) Received: from 134.132.93.152 by lgchvw01.lgc.com (InterScan E-Mail VirusWall NT); Tue, 16 Mar 2004 10:01:19 -0600 Received: by lgchexchbh.ad.lgc.com with Internet Mail Service (5.5.2657.72) id ; Tue, 16 Mar 2004 10:01:19 -0600 Message-ID: <830BF4914C3C4B4EB1C438D93ABF897A272B26@lgchexch011.ad.lgc.com> From: Dominique Devienne To: "'dev@ant.apache.org'" Subject: Pb with ++ Date: Tue, 16 Mar 2004 10:01:18 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I have 2 independent CruiseControl builds: one write help zip files to a server somewhere, while the other reads them when it detects changes when it wakes up. There a inherent concurrency issue / race condition in this scenario, which I try to address with the Ant code below. Failed to unzip helpzipfiles/foo.zip If I fail to unzip a file, I assume the file is bad, remove it, so that the next time CruiseControl fires the Ant build, redownloads the zip file, hopefully complete by then. The problem is that the *silently* fails to delete the file, as the CruiseControl XML log shows! I checked the code of Expand, and it does have a try/finally block, closing the ZipFile instance... Maybe it should also attempt to close the InputStream it got from ZipFile directly too??? ZipFile is supposed to do that, but apparently it doesn't work. I'm on Win2K, JDK 1.4.2, Ant 1.6.0. Also, shouldn't the failure to remove a file be logged at WARNING level, when cannot delete a file, rather than at DEBUG level only? And if the ZipFile.close() method really throws an exception, instead of simply ignoring it completely, shouldn't it be at least logged?!?!?! Thanks, --DD --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org