Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 67232 invoked from network); 29 May 2006 02:56:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 May 2006 02:56:06 -0000 Received: (qmail 87113 invoked by uid 500); 29 May 2006 02:56:05 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 87058 invoked by uid 500); 29 May 2006 02:56:04 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 87047 invoked by uid 500); 29 May 2006 02:56:04 -0000 Received: (qmail 87043 invoked by uid 99); 29 May 2006 02:56:04 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 May 2006 19:56:04 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 May 2006 19:56:04 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 0FF731A983A; Sun, 28 May 2006 19:55:44 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r410014 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java Date: Mon, 29 May 2006 02:55:43 -0000 To: ant-cvs@apache.org From: kevj@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060529025544.0FF731A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: kevj Date: Sun May 28 19:55:43 2006 New Revision: 410014 URL: http://svn.apache.org/viewvc?rev=410014&view=rev Log: remove deprecated code Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java?rev=410014&r1=410013&r2=410014&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/BuildNumber.java Sun May 28 19:55:43 2006 @@ -1,5 +1,5 @@ /* - * Copyright 2002-2005 The Apache Software Foundation + * Copyright 2002-2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -129,7 +129,6 @@ } catch (final NumberFormatException nfe) { final String message = myFile + " contains a non integer build number: " + buildNumber; - throw new BuildException(message, nfe); } } @@ -173,7 +172,7 @@ private void validate() throws BuildException { if (null == myFile) { - myFile = getProject().resolveFile(DEFAULT_FILENAME); + myFile = FILE_UTILS.resolveFile(getProject().getBaseDir(), DEFAULT_FILENAME); } if (!myFile.exists()) { @@ -182,20 +181,17 @@ } catch (final IOException ioe) { final String message = myFile + " doesn't exist and new file can't be created."; - throw new BuildException(message, ioe); } } if (!myFile.canRead()) { final String message = "Unable to read from " + myFile + "."; - throw new BuildException(message); } if (!myFile.canWrite()) { final String message = "Unable to write to " + myFile + "."; - throw new BuildException(message); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org