ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Skeet" <jon.sk...@peramon.com>
Subject RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant DemuxOutputStream.java
Date Tue, 26 Feb 2002 15:27:36 GMT
> jskeet      02/02/26 07:25:15
> 
>   Modified:    src/main/org/apache/tools/ant DemuxOutputStream.java
>   Log:
>   Fixed problem which gave (on Windows) output such as:
>   [java] First line of real output
>   [java]
>   [java] Second line of real output
>   [java]

I'd *really* appreciate it if others looked at this, especially as it was me raising a bug
that caused this one in the first place :)

The problem was that the "skip" field was being set on a buffer after it had been processed
- and processing the buffer removed it from the hashtable, so that the new skip value was
effectively ignored. We now just close the previous ByteArrayOutputStream and set skip to
false, but keep the same BufferInfo in the hashtable, so that future changes to that BufferInfo
are still kept relevant. close() removes the BufferInfo from the hashtable.

This certainly fixes the problem on my box, and I'm pretty confident about it (otherwise I
wouldn't have committed it) but it's obviously a core class, so could do with more eyes!

Jon

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