<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 93: NullPointerException in TeeOutputStream</title><link>https://sourceforge.net/p/dacapobench/bugs/93/</link><description>Recent changes to 93: NullPointerException in TeeOutputStream</description><atom:link href="https://sourceforge.net/p/dacapobench/bugs/93/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 10 Apr 2012 15:47:55 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/dacapobench/bugs/93/feed.rss" rel="self" type="application/rss+xml"/><item><title>NullPointerException in TeeOutputStream</title><link>https://sourceforge.net/p/dacapobench/bugs/93/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The class TeeOutputStream is used to redirect System.out, and so is used from multiple threads. It is, however, not thread-safe.&lt;/p&gt;
&lt;p&gt;The relevant part of the code is the following:&lt;/p&gt;
&lt;p&gt;class TeeOutputStream {&lt;br /&gt;
private OutputStream log;&lt;br /&gt;
public void closeLog() { log = null; }&lt;br /&gt;
public void write() { if (log != null) /* here another thread calls closeLog */ log.write(); }&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;I have observed this bug with the tomcat benchmark. But, being a concurrency bug, it is hard to reproduce.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Radu GRIGORE</dc:creator><pubDate>Tue, 10 Apr 2012 15:47:55 -0000</pubDate><guid>https://sourceforge.net0e0d5de9289afbad751eef75db04260190a34b1c</guid></item></channel></rss>