ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/types Path.java
Date Tue, 07 Dec 2004 21:49:09 GMT
mbenson     2004/12/07 13:49:09

  Modified:    src/main/org/apache/tools/ant/types Path.java
  Log:
  Useless temporary variables mostly.
  
  Revision  Changes    Path
  1.64      +12 -10    ant/src/main/org/apache/tools/ant/types/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Path.java,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- Path.java	23 Jun 2004 13:32:57 -0000	1.63
  +++ Path.java	7 Dec 2004 21:49:09 -0000	1.64
  @@ -96,12 +96,18 @@
       /**
        * Invoked by IntrospectionHelper for <code>setXXX(Path p)</code>
        * attribute setters.
  +     * @param project the <CODE>Project</CODE> for this path.
  +     * @param path the <CODE>String</CODE> path definition.
        */
       public Path(Project p, String path) {
           this(p);
           createPathElement().setPath(path);
       }
   
  +    /**
  +     * Construct an empty <CODE>Path</CODE>.
  +     * @param project the <CODE>Project</CODE> for this path.
  +     */
       public Path(Project project) {
           setProject(project);
           elements = new Vector();
  @@ -122,7 +128,7 @@
   
       /**
        * Parses a path definition and creates single PathElements.
  -     * @param path the path definition.
  +     * @param path the <CODE>String</CODE> path definition.
        */
       public void setPath(String path) throws BuildException {
           if (isReference()) {
  @@ -322,21 +328,17 @@
                   }
               } else if (o instanceof DirSet) {
                   DirSet dset = (DirSet) o;
  -                DirectoryScanner ds = dset.getDirectoryScanner(getProject());
  -                String[] s = ds.getIncludedDirectories();
  -                File dir = dset.getDir(getProject());
  -                addUnlessPresent(result, dir, s);
  +                addUnlessPresent(result, dset.getDir(getProject()),
  +                    dset.getDirectoryScanner(getProject()).getIncludedDirectories());
               } else if (o instanceof FileSet) {
                   FileSet fs = (FileSet) o;
                   DirectoryScanner ds = fs.getDirectoryScanner(getProject());
  -                String[] s = ds.getIncludedFiles();
                   File dir = fs.getDir(getProject());
  -                addUnlessPresent(result, dir, s);
  +                addUnlessPresent(result, dir, ds.getIncludedFiles());
               } else if (o instanceof FileList) {
                   FileList fl = (FileList) o;
  -                String[] s = fl.getFiles(getProject());
  -                File dir = fl.getDir(getProject());
  -                addUnlessPresent(result, dir, s);
  +                addUnlessPresent(result,
  +                    fl.getDir(getProject()), fl.getFiles(getProject()));
               }
           }
           String[] res = new String[result.size()];
  
  
  

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


Mime
View raw message