Browse Source

remove redundant code from FileUtils, handle Netware case in

IntrospectionHelper's testcase.

Submitted by:	Jeff Tulley <JTULLEY@novell.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269800 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
490a7cd059
3 changed files with 6 additions and 7 deletions
  1. +3
    -0
      WHATSNEW
  2. +0
    -6
      src/main/org/apache/tools/ant/util/FileUtils.java
  3. +3
    -1
      src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java

+ 3
- 0
WHATSNEW View File

@@ -14,6 +14,9 @@ Other changes:
* The attribute zipfile in GZip has been deprecated and superseded
by "tofile" attribute.

* Added a new condition <isset> that test for the existence of a
property to the condition task.

Fixed bugs:
-----------



+ 0
- 6
src/main/org/apache/tools/ant/util/FileUtils.java View File

@@ -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);
}


+ 3
- 1
src/testcases/org/apache/tools/ant/IntrospectionHelperTest.java View File

@@ -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));
}


Loading…
Cancel
Save