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/optional/sitraka Coverage.java
Date Sat, 29 Dec 2001 23:58:02 GMT
donaldp     01/12/29 15:58:02

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka
                        Coverage.java
  Log:
  Update to use new format of LogOutputStream where you pass in a Logger
  
  Revision  Changes    Path
  1.12      +9 -7      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java
  
  Index: Coverage.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Coverage.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Coverage.java	23 Dec 2001 14:22:47 -0000	1.11
  +++ Coverage.java	29 Dec 2001 23:58:02 -0000	1.12
  @@ -20,6 +20,7 @@
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.exec.Execute;
   import org.apache.tools.ant.taskdefs.exec.LogStreamHandler;
  +import org.apache.tools.ant.taskdefs.exec.LogOutputStream;
   import org.apache.tools.ant.types.Argument;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.CommandlineJava;
  @@ -294,7 +295,9 @@
               cmdl.createArgument().setValue( "-jp_input=" + paramfile.getAbsolutePath()
);
   
               // use the custom handler for stdin issues
  -            LogStreamHandler handler = new CoverageStreamHandler( this );
  +                    final LogOutputStream output = new LogOutputStream( getLogger(), false
);
  +        final LogOutputStream error = new LogOutputStream( getLogger(), true );
  +        final LogStreamHandler handler = new CoverageStreamHandler( output, error );
               Execute exec = new Execute( handler );
               getLogger().debug( cmdl.toString() );
               exec.setCommandline( cmdl.getCommandline() );
  @@ -383,9 +386,7 @@
               params.add( args[ i ] );
           }
   
  -        String[] array = new String[ params.size() ];
  -        params.copyInto( array );
  -        return array;
  +        return (String[])params.toArray( new String[ params.size() ] );
       }
   
       /**
  @@ -540,11 +541,12 @@
       /**
        * specific pumper to avoid those nasty stdin issues
        */
  -    static class CoverageStreamHandler extends LogStreamHandler
  +    static class CoverageStreamHandler
  +        extends LogStreamHandler
       {
  -        CoverageStreamHandler( Task task )
  +        CoverageStreamHandler( OutputStream output, OutputStream error )
           {
  -            super( task, Project.MSG_INFO, Project.MSG_WARN );
  +            super( output, error );
           }
   
           /**
  
  
  

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