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/types PatternSet.java
Date Tue, 08 Jan 2002 22:49:36 GMT
sbailliez    02/01/08 14:49:36

  Modified:    src/main/org/apache/tools/ant/types PatternSet.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.16      +7 -3      jakarta-ant/src/main/org/apache/tools/ant/types/PatternSet.java
  
  Index: PatternSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/PatternSet.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- PatternSet.java	12 Dec 2001 09:17:36 -0000	1.15
  +++ PatternSet.java	8 Jan 2002 22:49:36 -0000	1.16
  @@ -390,7 +390,9 @@
        * Convert a vector of NameEntry elements into an array of Strings.
        */
       private String[] makeArray(Vector list, Project p) {
  -        if (list.size() == 0) return null;
  +        if (list.size() == 0) {
  +          return null;
  +        }
   
           Vector tmpNames = new Vector();
           for (Enumeration e = list.elements() ; e.hasMoreElements() ;) {
  @@ -417,10 +419,11 @@
                   String fileName = ne.evalName(p);
                   if (fileName != null) {
                       File inclFile = p.resolveFile(fileName);
  -                    if (!inclFile.exists())
  +                    if (!inclFile.exists()) {
                           throw new BuildException("Includesfile "
                                                    + inclFile.getAbsolutePath()
                                                    + " not found.");
  +                    }
                       readPatterns(inclFile, includeList, p);
                   }
               }
  @@ -434,10 +437,11 @@
                   String fileName = ne.evalName(p);
                   if (fileName != null) {
                       File exclFile = p.resolveFile(fileName);
  -                    if (!exclFile.exists())
  +                    if (!exclFile.exists()) {
                           throw new BuildException("Excludesfile "
                                                    + exclFile.getAbsolutePath()
                                                    + " not found.");
  +                    }
                       readPatterns(exclFile, excludeList, p);
                   }
               }
  
  
  

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