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 SysPropertiesRedirector.java
Date Fri, 26 Apr 2002 06:45:55 GMT
donaldp     02/04/25 23:45:55

  Modified:    aut/src/java/org/apache/aut/jprocess StdioRedirector.java
                        SysPropertiesRedirector.java
  Log:
  Make the redirectors return the old state associated with binding so that it can be stored
and rebound later on.
  
  Revision  Changes    Path
  1.4       +8 -7      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StdioRedirector.java	26 Apr 2002 02:55:02 -0000	1.3
  +++ StdioRedirector.java	26 Apr 2002 06:45:54 -0000	1.4
  @@ -28,7 +28,7 @@
    * standard error of process.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.3 $ $Date: 2002/04/26 02:55:02 $
  + * @version $Revision: 1.4 $ $Date: 2002/04/26 06:45:54 $
    */
   public final class StdioRedirector
   {
  @@ -118,8 +118,9 @@
        * @param input the stream to bind
        * @throws SecurityException if don't have permission to bind to input
        * @throws IllegalStateException if redirector not installed
  +     * @return stream that was previously bound to input
        */
  -    public static void bindInput( final InputStream input )
  +    public static InputStream bindInput( final InputStream input )
           throws SecurityException, IllegalStateException
       {
           if( null == input )
  @@ -139,7 +140,7 @@
               manager.checkPermission( permission );
           }
   
  -        c_input.bindStream( input );
  +        return c_input.bindStream( input );
       }
   
       /**
  @@ -149,7 +150,7 @@
        * @throws SecurityException if don't have permission to bind to output
        * @throws IllegalStateException if redirector not installed
        */
  -    public static void bindOutput( final OutputStream output )
  +    public static OutputStream bindOutput( final OutputStream output )
           throws SecurityException, IllegalStateException
       {
           if( null == output )
  @@ -169,7 +170,7 @@
               manager.checkPermission( permission );
           }
   
  -        c_output.bindStream( output );
  +        return c_output.bindStream( output );
       }
   
       /**
  @@ -179,7 +180,7 @@
        * @throws SecurityException if don't have permission to bind to error
        * @throws IllegalStateException if redirector not installed
        */
  -    public static void bindError( final OutputStream error )
  +    public static OutputStream bindError( final OutputStream error )
           throws SecurityException, IllegalStateException
       {
           if( null == error )
  @@ -199,6 +200,6 @@
               manager.checkPermission( permission );
           }
   
  -        c_error.bindStream( error );
  +        return c_error.bindStream( error );
       }
   }
  
  
  
  1.2       +3 -3      jakarta-ant-myrmidon/aut/src/java/org/apache/aut/jprocess/SysPropertiesRedirector.java
  
  Index: SysPropertiesRedirector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/aut/src/java/org/apache/aut/jprocess/SysPropertiesRedirector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SysPropertiesRedirector.java	26 Apr 2002 02:53:21 -0000	1.1
  +++ SysPropertiesRedirector.java	26 Apr 2002 06:45:54 -0000	1.2
  @@ -21,7 +21,7 @@
    * to the default System properties.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/26 02:53:21 $
  + * @version $Revision: 1.2 $ $Date: 2002/04/26 06:45:54 $
    */
   public final class SysPropertiesRedirector
   {
  @@ -95,7 +95,7 @@
        * @throws SecurityException if don't have permission to bind to input
        * @throws IllegalStateException if redirector not installed
        */
  -    public static void bindProperties( final Properties properties )
  +    public static Properties bindProperties( final Properties properties )
           throws SecurityException, IllegalStateException
       {
           if( null == properties )
  @@ -115,6 +115,6 @@
               manager.checkPermission( permission );
           }
   
  -        c_properties.bindProperties( properties );
  +        return c_properties.bindProperties( properties );
       }
   }
  
  
  

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