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/taskdefs/compilers DefaultCompilerAdapter.java
Date Sun, 20 Jan 2002 09:52:38 GMT
donaldp     02/01/20 01:52:38

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers
                        DefaultCompilerAdapter.java
  Log:
  Move addExtdirs to PathUtils
  
  Revision  Changes    Path
  1.26      +7 -28     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- DefaultCompilerAdapter.java	20 Jan 2002 02:11:42 -0000	1.25
  +++ DefaultCompilerAdapter.java	20 Jan 2002 09:52:38 -0000	1.26
  @@ -11,15 +11,15 @@
   import java.io.FileWriter;
   import java.io.IOException;
   import java.io.PrintWriter;
  +import org.apache.avalon.excalibur.io.IOUtil;
   import org.apache.avalon.excalibur.util.StringUtil;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.myrmidon.api.TaskContext;
   import org.apache.tools.ant.taskdefs.Javac;
   import org.apache.tools.ant.taskdefs.exec.Execute2;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.Path;
  -import org.apache.tools.ant.types.FileSet;
  +import org.apache.tools.ant.types.PathUtil;
   import org.apache.tools.ant.util.FileUtils;
   
   /**
  @@ -288,7 +288,7 @@
           }
   
           // add the classpath
  -        if ( m_compileClasspath != null )
  +        if( m_compileClasspath != null )
           {
               classpath.addExisting( m_compileClasspath );
           }
  @@ -344,22 +344,13 @@
                       System.arraycopy( args, 0, commandArray, 0, firstFileName );
                       commandArray[ firstFileName ] = "@" + tmpFile.getAbsolutePath();
                   }
  -                catch( IOException e )
  +                catch( final IOException ioe )
                   {
  -                    throw new TaskException( "Error creating temporary file", e );
  +                    throw new TaskException( "Error creating temporary file", ioe );
                   }
                   finally
                   {
  -                    if( out != null )
  -                    {
  -                        try
  -                        {
  -                            out.close();
  -                        }
  -                        catch( Throwable t )
  -                        {
  -                        }
  -                    }
  +                    IOUtil.shutdownWriter( out );
                   }
               }
               else
  @@ -439,19 +430,7 @@
               }
           }
   
  -        final String[] dirs = m_extdirs.list();
  -        for( int i = 0; i < dirs.length; i++ )
  -        {
  -            final File dir = new File( dirs[ i ] );
  -            if( dir.exists() && dir.isDirectory() )
  -            {
  -                final FileSet fileSet = new FileSet();
  -                fileSet.setDir( dir );
  -                fileSet.setIncludes( "*" );
  -                path.addFileset( fileSet );
  -            }
  -        }
  +        PathUtil.addExtdirs( path, m_extdirs );
       }
  -
   }
   
  
  
  

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