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/taskdefs/optional XalanLiaison.java
Date Tue, 08 Jan 2002 19:55:11 GMT
sbailliez    02/01/08 11:55:11

  Modified:    src/main/org/apache/tools/ant/taskdefs XSLTProcess.java
               src/main/org/apache/tools/ant/taskdefs/optional
                        XalanLiaison.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.31      +11 -4     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
  
  Index: XSLTProcess.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- XSLTProcess.java	7 Dec 2001 16:10:17 -0000	1.30
  +++ XSLTProcess.java	8 Jan 2002 19:55:11 -0000	1.31
  @@ -194,8 +194,9 @@
           dirs = scanner.getIncludedDirectories();
           for (int j = 0;j < dirs.length;++j){
               list=new File(baseDir,dirs[j]).list();
  -            for (int i = 0;i < list.length;++i)
  +            for (int i = 0;i < list.length;++i) {
                   process( baseDir, list[i], destDir, stylesheet );
  +            }
           }
       } //-- execute
   
  @@ -386,7 +387,9 @@
               }
           }catch (Exception ex) {
               log("Failed to process " + inFile, Project.MSG_INFO);
  -            if(outFile!=null)outFile.delete();
  +            if(outFile!=null) {
  +             outFile.delete();
  +            }
               throw new BuildException(ex);
           }
       }
  @@ -456,12 +459,16 @@
           }
   
           public String getName() throws BuildException{
  -            if(name==null)throw new BuildException("Name attribute is missing.");
  +            if(name==null) {
  +             throw new BuildException("Name attribute is missing.");
  +            }
               return name;
           }
   
           public String getExpression() throws BuildException{
  -            if(expression==null)throw new BuildException("Expression attribute is missing.");
  +            if(expression==null) {
  +             throw new BuildException("Expression attribute is missing.");
  +            }
               return expression;
           }
       }
  
  
  
  1.9       +2 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java
  
  Index: XalanLiaison.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/XalanLiaison.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XalanLiaison.java	26 Nov 2001 18:10:45 -0000	1.8
  +++ XalanLiaison.java	8 Jan 2002 19:55:11 -0000	1.9
  @@ -130,7 +130,8 @@
       }
   
       public void setOutputtype(String type) throws Exception {
  -        if (!type.equals("xml")) 
  +        if (!type.equals("xml")) { 
               throw new BuildException("Unsupported output type: " + type);
  +        }
       }
   } //-- XalanLiaison
  
  
  

--
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