Browse Source

opps, allow tests to compile again

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@472657 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 19 years ago
parent
commit
d1c936e7c6
3 changed files with 29 additions and 16 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
  2. +13
    -8
      src/main/org/apache/tools/ant/taskdefs/condition/IsReachable.java
  3. +15
    -7
      src/main/org/apache/tools/ant/taskdefs/condition/ParserSupports.java

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/FixCRLF.java View File

@@ -83,7 +83,7 @@ import org.apache.tools.ant.util.FileUtils;


public class FixCRLF extends MatchingTask implements ChainableReader { public class FixCRLF extends MatchingTask implements ChainableReader {


private static final String ERROR_FILE_AND_SRCDIR
public static final String ERROR_FILE_AND_SRCDIR
= "srcdir and file are mutually exclusive"; = "srcdir and file are mutually exclusive";


private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();


+ 13
- 8
src/main/org/apache/tools/ant/taskdefs/condition/IsReachable.java View File

@@ -65,11 +65,11 @@ public class IsReachable extends ProjectComponent implements Condition {
/** /**
* Error when no hostname is defined * Error when no hostname is defined
*/ */
private static final String ERROR_NO_HOSTNAME = "No hostname defined";
public static final String ERROR_NO_HOSTNAME = "No hostname defined";
/** /**
* Error when invalid timeout value is defined * Error when invalid timeout value is defined
*/ */
private static final String ERROR_BAD_TIMEOUT = "Invalid timeout value";
public static final String ERROR_BAD_TIMEOUT = "Invalid timeout value";
/** /**
* Unknown host message is seen. * Unknown host message is seen.
*/ */
@@ -77,14 +77,19 @@ public class IsReachable extends ProjectComponent implements Condition {
/** /**
* Network error message is seen. * Network error message is seen.
*/ */
private static final String ERROR_ON_NETWORK = "network error to ";
private static final String ERROR_BOTH_TARGETS
public static final String ERROR_ON_NETWORK = "network error to ";
/** Error message when url and host are specified. */
public static final String ERROR_BOTH_TARGETS
= "Both url and host have been specified"; = "Both url and host have been specified";
private static final String MSG_NO_REACHABLE_TEST
/** Error message when no reachably test avail. */
public static final String MSG_NO_REACHABLE_TEST
= "cannot do a proper reachability test on this Java version"; = "cannot do a proper reachability test on this Java version";
private static final String ERROR_BAD_URL = "Bad URL ";
private static final String ERROR_NO_HOST_IN_URL = "No hostname in URL ";
private static final String METHOD_NAME = "isReachable";
/** Error message when an invalid url is used. */
public static final String ERROR_BAD_URL = "Bad URL ";
/** Error message when no hostname in url. */
public static final String ERROR_NO_HOST_IN_URL = "No hostname in URL ";
/** The method name to look for in InetAddress */
public static final String METHOD_NAME = "isReachable";


/** /**
* Set the host to ping. * Set the host to ping.


+ 15
- 7
src/main/org/apache/tools/ant/taskdefs/condition/ParserSupports.java View File

@@ -35,18 +35,26 @@ public class ParserSupports extends ProjectComponent implements Condition {
private String feature; private String feature;
private String property; private String property;
private String value; private String value;
private static final String ERROR_BOTH_ATTRIBUTES =
// Error messages
/** error - combined attributes not allowed */
public static final String ERROR_BOTH_ATTRIBUTES =
"Property and feature attributes are exclusive"; "Property and feature attributes are exclusive";
private static final String FEATURE = "feature";
private static final String PROPERTY = "property";
/** feature */
public static final String FEATURE = "feature";
/** property */
public static final String PROPERTY = "property";


private static final String NOT_RECOGNIZED =
/** error - not recognized */
public static final String NOT_RECOGNIZED =
" not recognized: "; " not recognized: ";
private static final String NOT_SUPPORTED =
/** error - not supported */
public static final String NOT_SUPPORTED =
" not supported: "; " not supported: ";
private static final String ERROR_NO_ATTRIBUTES =
/** error - missing attribute */
public static final String ERROR_NO_ATTRIBUTES =
"Neither feature or property are set"; "Neither feature or property are set";
private static final String ERROR_NO_VALUE =
/** error - no value */
public static final String ERROR_NO_VALUE =
"A value is needed when testing for property support"; "A value is needed when testing for property support";


/** /**


Loading…
Cancel
Save