From 3f93e18604951f8d8d8456dc46c559b8a0e4d834 Mon Sep 17 00:00:00 2001 From: Daryl Lee Date: Thu, 26 Dec 2002 01:21:25 +0000 Subject: java/io/PipedOutputStreaml.java: corrected connect() for test of previous connection --- ChangeLog | 5 +++++ java/io/PipedOutputStream.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4a7e3c1f8..fee50cd05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-12-25 Daryl Lee + + * java/io/PipedOutputStream.java: corrected connect(); test to check if + already connected was invalid. + 2002-12-24 Mark Wielaard * java/util/Properties.java (formatForOutput): Don't fall diff --git a/java/io/PipedOutputStream.java b/java/io/PipedOutputStream.java index b819f309c..68b656b19 100644 --- a/java/io/PipedOutputStream.java +++ b/java/io/PipedOutputStream.java @@ -97,7 +97,7 @@ public class PipedOutputStream extends OutputStream */ public void connect(PipedInputStream sink) throws IOException { - if (sink != null) + if (this.sink != null || sink.source != null) throw new IOException ("Already connected"); sink.connect(this); } -- cgit v1.2.1