From 97b8365cafc3a344a22d3980b8ed885f5c6d8357 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 9 Jan 2007 19:58:05 +0000 Subject: Merged gcj-eclipse branch to trunk. From-SVN: r120621 --- libjava/classpath/java/io/PipedInputStream.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libjava/classpath/java/io/PipedInputStream.java') diff --git a/libjava/classpath/java/io/PipedInputStream.java b/libjava/classpath/java/io/PipedInputStream.java index 523ae2c..c0396d2 100644 --- a/libjava/classpath/java/io/PipedInputStream.java +++ b/libjava/classpath/java/io/PipedInputStream.java @@ -279,6 +279,10 @@ public class PipedInputStream extends InputStream if (closed) throw new IOException ("Pipe closed"); + // Don't block if nothing was requested. + if (len == 0) + return 0; + // If the buffer is empty, wait until there is something in the pipe // to read. try -- cgit v1.1