ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant Project.java
Date Tue, 08 Jan 2002 22:13:13 GMT
sbailliez    02/01/08 14:13:13

  Modified:    src/main/org/apache/tools/ant Project.java
  Log:
  Fix bad coding style.
  then/else parts of if statement and loop body must always been enclosed
  in a block statement.
  
  Revision  Changes    Path
  1.91      +14 -6     jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- Project.java	7 Jan 2002 04:11:38 -0000	1.90
  +++ Project.java	8 Jan 2002 22:13:12 -0000	1.91
  @@ -366,7 +366,9 @@
        * @return the property value, or null for no match
        */
       public String getProperty(String name) {
  -        if (name == null) return null;
  +        if (name == null) {
  +          return null;
  +        }
           String property = (String) properties.get(name);
           return property;
       }
  @@ -388,7 +390,9 @@
        * @return the property value, or null for no match
        */
       public String getUserProperty(String name) {
  -        if (name == null) return null;
  +        if (name == null) {
  +          return null;
  +        }
           String property = (String) userProperties.get(name);
           return property;
       }
  @@ -516,10 +520,12 @@
        */
       public void setBaseDir(File baseDir) throws BuildException {
           baseDir = fileUtils.normalize(baseDir.getAbsolutePath());
  -        if (!baseDir.exists()) 
  +        if (!baseDir.exists()) { 
               throw new BuildException("Basedir " + baseDir.getAbsolutePath() + " does not
exist");
  -        if (!baseDir.isDirectory()) 
  +        }
  +        if (!baseDir.isDirectory()) { 
               throw new BuildException("Basedir " + baseDir.getAbsolutePath() + " is not
a directory");
  +        }
           this.baseDir = baseDir;
           setPropertyInternal( "basedir", this.baseDir.getPath());
           String msg = "Project base dir set to: " + this.baseDir;
  @@ -635,8 +641,9 @@
               log(message, Project.MSG_ERR);
               throw new BuildException(message);
           }
  -        if( !Task.class.isAssignableFrom(taskClass) )
  +        if( !Task.class.isAssignableFrom(taskClass) ) {
               TaskAdapter.checkTaskClass(taskClass, this);
  +        }
       }
   
       /**
  @@ -815,8 +822,9 @@
       public Object createDataType(String typeName) throws BuildException {
           Class c = (Class) dataClassDefinitions.get(typeName);
   
  -        if (c == null)
  +        if (c == null) {
               return null;
  +        }
   
           try {
               java.lang.reflect.Constructor ctor = null;
  
  
  

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


Mime
View raw message