ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/condition TypeFound.java
Date Thu, 22 Jan 2004 19:08:36 GMT
peterreilly    2004/01/22 11:08:36

  Modified:    src/main/org/apache/tools/ant/taskdefs/condition
                        TypeFound.java
  Log:
  checkstyle
  
  Revision  Changes    Path
  1.2       +9 -7      ant/src/main/org/apache/tools/ant/taskdefs/condition/TypeFound.java
  
  Index: TypeFound.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/condition/TypeFound.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeFound.java	22 Jan 2004 18:02:57 -0000	1.1
  +++ TypeFound.java	22 Jan 2004 19:08:36 -0000	1.2
  @@ -63,6 +63,7 @@
    * looks for a task or other Ant type that exists. Existence is defined as
    * the type is defined, and its implementation class is present. This
    * will work for datatypes and preset, script and macro definitions.
  + * @author Steve Loughran
    */
   public class TypeFound extends ProjectComponent implements Condition {
   
  @@ -70,7 +71,7 @@
   
       /**
        * the task or other type to look for
  -     * @param name
  +     * @param name the name of the type
        */
       public void setName(String name) {
           this.name = name;
  @@ -78,18 +79,19 @@
   
       /**
        * test for a task or other ant type existing in the current project
  -     * @param typename
  +     * @param typename the name of the type
        * @return true if the typename exists
        */
       protected boolean doesTypeExist(String typename) {
   
  -        ComponentHelper helper=ComponentHelper.getComponentHelper(getProject());
  -        AntTypeDefinition def=helper.getDefinition(typename);
  -        if(def==null) {
  +        ComponentHelper helper =
  +            ComponentHelper.getComponentHelper(getProject());
  +        AntTypeDefinition def = helper.getDefinition(typename);
  +        if (def == null) {
               return false;
           }
           //now verify that the class has an implementation
  -        return def.getExposedClass(getProject())!=null;
  +        return def.getExposedClass(getProject()) != null;
       }
   
   
  @@ -99,7 +101,7 @@
        * @exception BuildException if an error occurs
        */
       public boolean eval() throws BuildException {
  -        if(name==null) {
  +        if (name == null) {
               throw new BuildException("No type specified");
           }
           return doesTypeExist(name);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message