ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types Path.java
Date Sun, 06 Jan 2002 02:31:35 GMT
donaldp     02/01/05 18:31:35

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/types
                        Path.java
  Log:
  Remove de-referencing stuff and cleaned up object a little.
  
  Revision  Changes    Path
  1.14      +5 -18     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Path.java	4 Jan 2002 09:26:42 -0000	1.13
  +++ Path.java	6 Jan 2002 02:31:35 -0000	1.14
  @@ -416,7 +416,6 @@
        * @exception TaskException Description of Exception
        */
       public Path createPath()
  -        throws TaskException
       {
           final Path other = new Path();
           elements.add( other );
  @@ -443,18 +442,6 @@
           for( int i = 0; i < elements.size(); i++ )
           {
               Object o = elements.get( i );
  -            if( o instanceof Reference )
  -            {
  -                Reference r = (Reference)o;
  -                o = r.getReferencedObject( getProject() );
  -                // we only support references to paths right now
  -                if( !( o instanceof Path ) )
  -                {
  -                    String msg = r.getRefId() + " doesn\'t denote a path";
  -                    throw new TaskException( msg );
  -                }
  -            }
  -
               if( o instanceof String )
               {
                   // obtained via append
  @@ -465,7 +452,7 @@
                   String[] parts = ( (PathElement)o ).getParts();
                   if( parts == null )
                   {
  -                    throw new TaskException( "You must either set location or path on <pathelement>"
);
  +                    throw new NullPointerException( "You must either set location or path
on <pathelement>" );
                   }
                   for( int j = 0; j < parts.length; j++ )
                   {
  @@ -483,10 +470,10 @@
               }
               else if( o instanceof FileSet )
               {
  -                FileSet fs = (FileSet)o;
  -                DirectoryScanner ds = fs.getDirectoryScanner();
  -                String[] s = ds.getIncludedFiles();
  -                File dir = fs.getDir();
  +                final FileSet fs = (FileSet)o;
  +                final DirectoryScanner ds = fs.getDirectoryScanner();
  +                final String[] s = ds.getIncludedFiles();
  +                final File dir = fs.getDir();
                   for( int j = 0; j < s.length; j++ )
                   {
                       File f = new File( dir, s[ j ] );
  
  
  

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