From 490a7cd05980572aba55fb99fb78b16b8aac1228 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 18 Oct 2001 08:25:16 +0000 Subject: [PATCH] remove redundant code from FileUtils, handle Netware case in IntrospectionHelper's testcase. Submitted by: Jeff Tulley git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269800 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 3 +++ src/main/org/apache/tools/ant/util/FileUtils.java | 6 ------ .../org/apache/tools/ant/IntrospectionHelperTest.java | 4 +++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index 5687b9b32..96d52d7d2 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -14,6 +14,9 @@ Other changes: * The attribute zipfile in GZip has been deprecated and superseded by "tofile" attribute. +* Added a new condition that test for the existence of a + property to the condition task. + Fixed bugs: ----------- diff --git a/src/main/org/apache/tools/ant/util/FileUtils.java b/src/main/org/apache/tools/ant/util/FileUtils.java index 64e890ee2..2908bcd5a 100644 --- a/src/main/org/apache/tools/ant/util/FileUtils.java +++ b/src/main/org/apache/tools/ant/util/FileUtils.java @@ -323,12 +323,6 @@ public class FileUtils { return normalize(filename); } - if (filename.length() >= 2 && - Character.isLetter(filename.charAt(0)) && - filename.charAt(1) == ':') { - return normalize(filename); - } - if (file == null) { return new File(filename); } diff --git a/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java b/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java index a8ac5c1ed..f50e9fb63 100644 --- a/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java +++ b/src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java @@ -162,7 +162,7 @@ public class IntrospectionHelperTest extends TestCase { } try { ih.getElementType("eleven"); - fail("addTen takes primitive argument"); + fail("addEleven takes primitive argument"); } catch (BuildException be) { } try { @@ -424,6 +424,8 @@ public class IntrospectionHelperTest extends TestCase { public void setTen(File f) { if (isUnixStyle) { assertEquals("/tmp/2", f.getAbsolutePath()); + } else if (System.getProperty("os.name").toLowerCase().equals("netware")) { + assertEquals("\\tmp\\2", f.getAbsolutePath().toLowerCase()); } else { assertEquals(":\\tmp\\2", f.getAbsolutePath().toLowerCase().substring(1)); }