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-myrmidon/aut/src/java/org/apache/aut/jprocess StdioRedirector.java
Date Fri, 26 Apr 2002 02:31:40 GMT
donaldp     02/04/25 19:31:40

  Modified:    aut/src/java/org/apache/aut/jprocess StdioRedirector.java
  Log:
  m_* --> c_* as the variables were static
  
  Revision  Changes    Path
  1.2       +21 -21    jakarta-ant-myrmidon/aut/src/java/org/apache/aut/jprocess/StdioRedirector.java
  
  Index: StdioRedirector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/jprocess/StdioRedirector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StdioRedirector.java	26 Apr 2002 01:59:33 -0000	1.1
  +++ StdioRedirector.java	26 Apr 2002 02:31:40 -0000	1.2
  @@ -28,15 +28,15 @@
    * standard error of process.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/26 01:59:33 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/26 02:31:40 $
    */
   public final class StdioRedirector
   {
       private static final String NOT_INSTALLED_ERR = "StdioRedirector not installed";
   
  -    private static DemuxInputStream m_input;
  -    private static DemuxOutputStream m_output;
  -    private static DemuxOutputStream m_error;
  +    private static DemuxInputStream c_input;
  +    private static DemuxOutputStream c_output;
  +    private static DemuxOutputStream c_error;
   
       /**
        * Private constructor to block instantiation.
  @@ -55,22 +55,22 @@
       public static boolean install()
           throws IOException
       {
  -        if( m_input == System.in )
  +        if( c_input == System.in )
           {
               //Already installed so lets ignore
               return false;
           }
  -        m_input = new DemuxInputStream();
  -        m_output = new DemuxOutputStream();
  -        m_error = new DemuxOutputStream();
  -        m_input.bindStream( new FileInputStream( FileDescriptor.in ) );
  -        m_output.bindStream( new FileOutputStream( FileDescriptor.out ) );
  -        m_error.bindStream( new FileOutputStream( FileDescriptor.err ) );
  +        c_input = new DemuxInputStream();
  +        c_output = new DemuxOutputStream();
  +        c_error = new DemuxOutputStream();
  +        c_input.bindStream( new FileInputStream( FileDescriptor.in ) );
  +        c_output.bindStream( new FileOutputStream( FileDescriptor.out ) );
  +        c_error.bindStream( new FileOutputStream( FileDescriptor.err ) );
   
  -        final PrintStream output = new PrintStream( m_output, true );
  -        final PrintStream error = new PrintStream( m_error, true );
  +        final PrintStream output = new PrintStream( c_output, true );
  +        final PrintStream error = new PrintStream( c_error, true );
   
  -        System.setIn( m_input );
  +        System.setIn( c_input );
           System.setOut( output );
           System.setErr( error );
   
  @@ -88,7 +88,7 @@
       public static boolean uninstall()
           throws IOException
       {
  -        if( m_input != System.in )
  +        if( c_input != System.in )
           {
               //Already uninstalled so lets ignore
               return false;
  @@ -122,7 +122,7 @@
           {
               throw new NullPointerException( "input" );
           }
  -        if( null == m_input )
  +        if( null == c_input )
           {
               throw new IllegalStateException( NOT_INSTALLED_ERR );
           }
  @@ -135,7 +135,7 @@
               manager.checkPermission( permission );
           }
   
  -        m_input.bindStream( input );
  +        c_input.bindStream( input );
       }
   
       /**
  @@ -152,7 +152,7 @@
           {
               throw new NullPointerException( "output" );
           }
  -        if( null == m_output )
  +        if( null == c_output )
           {
               throw new IllegalStateException( NOT_INSTALLED_ERR );
           }
  @@ -165,7 +165,7 @@
               manager.checkPermission( permission );
           }
   
  -        m_output.bindStream( output );
  +        c_output.bindStream( output );
       }
   
       /**
  @@ -182,7 +182,7 @@
           {
               throw new NullPointerException( "error" );
           }
  -        if( null == m_error )
  +        if( null == c_error )
           {
               throw new IllegalStateException( NOT_INSTALLED_ERR );
           }
  @@ -195,6 +195,6 @@
               manager.checkPermission( permission );
           }
   
  -        m_error.bindStream( error );
  +        c_error.bindStream( 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