Return-Path: X-Original-To: apmail-ant-notifications-archive@minotaur.apache.org Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A2F3DD4E5 for ; Wed, 22 Aug 2012 18:11:36 +0000 (UTC) Received: (qmail 76699 invoked by uid 500); 22 Aug 2012 18:11:36 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 76538 invoked by uid 500); 22 Aug 2012 18:11:36 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 76497 invoked by uid 99); 22 Aug 2012 18:11:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2012 18:11:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2012 18:11:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4198D2388980 for ; Wed, 22 Aug 2012 18:10:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1376167 - in /ant/core/trunk/src/main/org/apache/tools/ant: launch/Locator.java util/FileUtils.java Date: Wed, 22 Aug 2012 18:10:38 -0000 To: notifications@ant.apache.org From: hibou@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120822181038.4198D2388980@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hibou Date: Wed Aug 22 18:10:37 2012 New Revision: 1376167 URL: http://svn.apache.org/viewvc?rev=1376167&view=rev Log: getAbsoluteFile is useless since as the javadoc of File.toURI clearly explain, produced URIs are absolute Modified: ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java?rev=1376167&r1=1376166&r2=1376167&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/launch/Locator.java Wed Aug 22 18:10:37 2012 @@ -405,7 +405,7 @@ public final class Locator { @Deprecated public static URL fileToURL(File file) throws MalformedURLException { - return new URL(file.getAbsoluteFile().toURI().toASCIIString()); + return new URL(file.toURI().toASCIIString()); } /** Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java?rev=1376167&r1=1376166&r2=1376167&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java Wed Aug 22 18:10:37 2012 @@ -138,7 +138,7 @@ public class FileUtils { * formed. */ public URL getFileURL(File file) throws MalformedURLException { - return new URL(toURI(file.getAbsolutePath())); + return new URL(file.toURI().toASCIIString()); } /** @@ -1209,7 +1209,7 @@ public class FileUtils { * @since Ant 1.6 */ public String toURI(String path) { - return new File(path).getAbsoluteFile().toURI().toASCIIString(); + return new File(path).toURI().toASCIIString(); } /**