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/src/main/org/apache/tools/ant/taskdefs/cvslib RedirectingStreamHandler.java
Date Thu, 04 Apr 2002 10:17:48 GMT
donaldp     02/04/04 02:17:48

  Modified:    src/main/org/apache/tools/ant/taskdefs/cvslib
                        RedirectingStreamHandler.java
  Log:
  Compile before commiting
  
  Revision  Changes    Path
  1.6       +12 -5     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/cvslib/RedirectingStreamHandler.java
  
  Index: RedirectingStreamHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/cvslib/RedirectingStreamHandler.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RedirectingStreamHandler.java	4 Apr 2002 10:13:07 -0000	1.5
  +++ RedirectingStreamHandler.java	4 Apr 2002 10:17:48 -0000	1.6
  @@ -64,7 +64,7 @@
    * A dummy stream handler that just passes stuff to the parser.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.5 $ $Date: 2002/04/04 10:13:07 $
  + * @version $Revision: 1.6 $ $Date: 2002/04/04 10:17:48 $
    */
   class RedirectingStreamHandler
       implements ExecuteStreamHandler, Runnable
  @@ -150,13 +150,20 @@
           // We cannot use a BufferedReader as the ready() method is bugged!
           // (see Bug 4329985, which is supposed to be fixed in JDK1.4 :
           //http://developer.java.sun.com/developer/bugParade/bugs/4329985.html)
  -        while( m_error.ready() )
  +        try
           {
  -            final int value = m_error.read();
  -            if( -1 != value )
  +            while( m_error.ready() )
               {
  -                m_errors.append( (char)value );
  +                final int value = m_error.read();
  +                if( -1 != value )
  +                {
  +                    m_errors.append( (char)value );
  +                }
               }
  +        }
  +        catch( final IOException ioe )
  +        {
  +            //ignore --> Means stderror has been shutdown
           }
       }
   
  
  
  

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