Browse Source

ispingable is defined, corrected validation logic (I think :)

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276940 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 21 years ago
parent
commit
8e933d962a
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/condition/IsPingable.java
  2. +1
    -0
      src/main/org/apache/tools/ant/types/defaults.properties

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/condition/IsPingable.java View File

@@ -71,7 +71,7 @@ public class IsPingable extends ProjectComponent implements Condition {
* if an error occurs * if an error occurs
*/ */
public boolean eval() throws BuildException { public boolean eval() throws BuildException {
if(host==null && host.length()==0) {
if(host==null || host.length()==0) {
throw new BuildException(ERROR_NO_HOSTNAME); throw new BuildException(ERROR_NO_HOSTNAME);
} }
if(timeout<0) { if(timeout<0) {


+ 1
- 0
src/main/org/apache/tools/ant/types/defaults.properties View File

@@ -33,3 +33,4 @@ scriptfilter=org.apache.tools.ant.types.optional.ScriptFilter
propertyset=org.apache.tools.ant.types.PropertySet propertyset=org.apache.tools.ant.types.PropertySet
assertions=org.apache.tools.ant.types.Assertions assertions=org.apache.tools.ant.types.Assertions
concatfilter=org.apache.tools.ant.filters.ConcatFilter concatfilter=org.apache.tools.ant.filters.ConcatFilter
org.apache.tools.ant.taskdefs.optional.condition.IsPingable

Loading…
Cancel
Save