diff options
author | Daryl Lee <dlee@altaregos.com> | 2002-12-24 14:56:53 +0000 |
---|---|---|
committer | Daryl Lee <dlee@altaregos.com> | 2002-12-24 14:56:53 +0000 |
commit | b1ba9e105e785513506570abc42658376b31aa0b (patch) | |
tree | 0398978c438d2df53d45f5b5ed137b2cc0ccb5c9 | |
parent | 63cd3a57c0859e69cdf4b6b3549efce94fa79390 (diff) | |
download | classpath-b1ba9e105e785513506570abc42658376b31aa0b.tar.gz |
java/io/PipedWriter.java corrected connect() method test for existing connection
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | java/io/PipedWriter.java | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2002-12-24 Daryl Lee <dolee@sources.redhat.com> + * java/io/PipedWriter.java: corrected connect(); test to check if + already connected was invalid. + 2002-12-24 C. Brian Jones <cbj@gnu.org> * INSTALL: updated link to bugs, tool version numbers diff --git a/java/io/PipedWriter.java b/java/io/PipedWriter.java index a8844d746..0ab3c0b8e 100644 --- a/java/io/PipedWriter.java +++ b/java/io/PipedWriter.java @@ -100,7 +100,7 @@ public class PipedWriter extends Writer */ public void connect(PipedReader sink) throws IOException { - if (sink != null) + if (this.sink != null || sink.source != null) throw new IOException ("Already connected"); sink.connect(this); } |