提交 f8caddbe 编写于 作者: K kohsuke

improved the diagnostics

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@36964 71c3de6d-444a-0410-be80-ed276b4c234a
上级 8ee74364
......@@ -48,6 +48,8 @@ public class FastPipedInputStream extends InputStream {
int writeLaps = 0;
int writePosition = 0;
private final Throwable allocatedAt = new Throwable();
/**
* Creates an unconnected PipedInputStream with a default buffer size.
*/
......@@ -78,7 +80,7 @@ public class FastPipedInputStream extends InputStream {
private FastPipedOutputStream source() throws IOException {
FastPipedOutputStream s = source.get();
if (s==null) throw new IOException("Writer side has already been abandoned");
if (s==null) throw (IOException)new IOException("Writer side has already been abandoned").initCause(allocatedAt);
return s;
}
......
......@@ -46,6 +46,8 @@ public class FastPipedOutputStream extends OutputStream {
*/
private long written=0;
private final Throwable allocatedAt = new Throwable();
/**
* Creates an unconnected PipedOutputStream.
*/
......@@ -75,7 +77,7 @@ public class FastPipedOutputStream extends OutputStream {
private FastPipedInputStream sink() throws IOException {
FastPipedInputStream s = sink.get();
if (s==null) throw new IOException("Reader side has already been abandoned");
if (s==null) throw (IOException)new IOException("Reader side has already been abandoned").initCause(allocatedAt);
return s;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册