peterreilly    2004/03/15 09:33:09

  Modified:    src/main/org/apache/tools/ant AntTypeDefinition.java
                        DirectoryScanner.java IntrospectionHelper.java
                        ProjectHelper.java Target.java
  Log:
  stylecheck
  
  Revision  Changes    Path
  1.12      +4 -8      ant/src/main/org/apache/tools/ant/AntTypeDefinition.java
  
  Index: AntTypeDefinition.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/AntTypeDefinition.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AntTypeDefinition.java    9 Mar 2004 16:47:59 -0000       1.11
  +++ AntTypeDefinition.java    15 Mar 2004 17:33:09 -0000      1.12
  @@ -352,17 +352,13 @@
           // is the same
           ClassLoader oldLoader = other.getClassLoader();
           ClassLoader newLoader = this.getClassLoader();
  -        if (oldLoader != null
  -            && newLoader != null
  +        return
  +            newLoader != null
  +            && oldLoader != null
               && oldLoader instanceof AntClassLoader
               && newLoader instanceof AntClassLoader
               && ((AntClassLoader) oldLoader).getClasspath()
  -            .equals(((AntClassLoader) newLoader).getClasspath())
  -            ) {
  -            return true;
  -        } else {
  -            return false;
  -        }
  +            .equals(((AntClassLoader) newLoader).getClasspath());
       }
   
       private String extractClassname(Class c) {
  
  
  
  1.71      +8 -8      ant/src/main/org/apache/tools/ant/DirectoryScanner.java
  
  Index: DirectoryScanner.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- DirectoryScanner.java     9 Mar 2004 16:47:59 -0000       1.70
  +++ DirectoryScanner.java     15 Mar 2004 17:33:09 -0000      1.71
  @@ -241,7 +241,7 @@
       private boolean followSymlinks = true;
   
       /** Helper. */
  -    private static final FileUtils fileUtils = FileUtils.newFileUtils();
  +    private static final FileUtils FILE_UTILS = FileUtils.newFileUtils();
   
       /** Whether or not everything tested so far has been included. */
       protected boolean everythingIncluded = true;
  @@ -684,14 +684,14 @@
                       // we need to double check.
                       try {
                           File canonFile = myfile.getCanonicalFile();
  -                        String path = fileUtils.removeLeadingPath(canonBase,
  +                        String path = FILE_UTILS.removeLeadingPath(canonBase,
                                                                     canonFile);
                           if (!path.equals(currentelement) || ON_VMS) {
                               myfile = findFile(basedir, currentelement);
                               if (myfile != null) {
                                   currentelement =
  -                                    fileUtils.removeLeadingPath(basedir,
  -                                                                myfile);
  +                                    FILE_UTILS.removeLeadingPath(basedir,
  +                                                                 myfile);
                               }
                           }
                       } catch (IOException ex) {
  @@ -704,7 +704,7 @@
                       if (f.exists()) {
                           // adapt currentelement to the case we've
                           // actually found
  -                        currentelement = fileUtils.removeLeadingPath(basedir,
  +                        currentelement = 
FILE_UTILS.removeLeadingPath(basedir,
                                                                        f);
                           myfile = f;
                       }
  @@ -833,7 +833,7 @@
               Vector noLinks = new Vector();
               for (int i = 0; i < newfiles.length; i++) {
                   try {
  -                    if (fileUtils.isSymbolicLink(dir, newfiles[i])) {
  +                    if (FILE_UTILS.isSymbolicLink(dir, newfiles[i])) {
                           String name = vpath + newfiles[i];
                           File   file = new File(dir, newfiles[i]);
                           if (file.isDirectory()) {
  @@ -1201,7 +1201,7 @@
        * @since Ant 1.5.2
        */
       public Resource getResource(String name) {
  -        File f = fileUtils.resolveFile(basedir, name);
  +        File f = FILE_UTILS.resolveFile(basedir, name);
           return new Resource(name, f.exists(), f.lastModified(),
                               f.isDirectory());
       }
  @@ -1346,7 +1346,7 @@
           if (pathElements.size() > 0) {
               String current = (String) pathElements.remove(0);
               try {
  -                if (fileUtils.isSymbolicLink(base, current)) {
  +                if (FILE_UTILS.isSymbolicLink(base, current)) {
                       return true;
                   } else {
                       base = new File(base, current);
  
  
  
  1.79      +3 -3      
ant/src/main/org/apache/tools/ant/IntrospectionHelper.java
  
  Index: IntrospectionHelper.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- IntrospectionHelper.java  9 Mar 2004 16:47:59 -0000       1.78
  +++ IntrospectionHelper.java  15 Mar 2004 17:33:09 -0000      1.79
  @@ -27,7 +27,6 @@
   import java.util.List;
   import java.util.Locale;
   import org.apache.tools.ant.types.EnumeratedAttribute;
  -import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.taskdefs.PreSetDef;
   
   /**
  @@ -310,6 +309,7 @@
                                   throws InvocationTargetException,
                                   IllegalAccessException, 
InstantiationException {
                                   if (child != null) {
  +                                    // Empty
                                   } else if (c.getParameterTypes().length == 
0) {
                                       child = c.newInstance(new Object[] {});
                                   } else {
  @@ -925,8 +925,8 @@
                       public void set(Project p, Object parent, String value)
                           throws InvocationTargetException, 
IllegalAccessException {
                           m.invoke(parent,
  -                                 new Boolean[] {
  -                                     new Boolean(Project.toBoolean(value))});
  +                                 new Boolean[] {Project.toBoolean(value)
  +                                                ? Boolean.TRUE : 
Boolean.FALSE});
                       }
   
                   };
  
  
  
  1.111     +1 -1      ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- ProjectHelper.java        9 Mar 2004 16:47:59 -0000       1.110
  +++ ProjectHelper.java        15 Mar 2004 17:33:09 -0000      1.111
  @@ -508,7 +508,7 @@
           if (index == -1) {
               return componentName;
           }
  -        return componentName.substring(index+1);
  +        return componentName.substring(index + 1);
       }
   
       /**
  
  
  
  1.51      +1 -0      ant/src/main/org/apache/tools/ant/Target.java
  
  Index: Target.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Target.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- Target.java       9 Mar 2004 16:47:59 -0000       1.50
  +++ Target.java       15 Mar 2004 17:33:09 -0000      1.51
  @@ -194,6 +194,7 @@
   
       /**
        * Does this target depend on the named target?
  +     * @param other the other named target.
        * @return true if the target does depend on the named target
        * @since Ant 1.6
        */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to