summaryrefslogtreecommitdiff
path: root/java/io/PipedInputStream.java
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2006-10-05 02:44:18 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2006-10-05 02:44:18 +0000
commit2799793789d5b66c90efbd1a3eb56e0c1ec57f88 (patch)
tree9157197f502b6830af9cafe029fd3d47628a7ed6 /java/io/PipedInputStream.java
parent7516107c5abe26f7a4378017344eb9e449ebc28e (diff)
downloadclasspath-2799793789d5b66c90efbd1a3eb56e0c1ec57f88.tar.gz
2006-10-05 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of HEAD-->generics for 2006/09/03-2006/10/04.
Diffstat (limited to 'java/io/PipedInputStream.java')
-rw-r--r--java/io/PipedInputStream.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/io/PipedInputStream.java b/java/io/PipedInputStream.java
index 523ae2c70..c0396d206 100644
--- a/java/io/PipedInputStream.java
+++ b/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