diff options
author | Andreas Loth | 2017-03-13 05:50:04 +0000 |
---|---|---|
committer | Sarika Sinha | 2017-03-13 05:50:04 +0000 |
commit | c9e938ae8fd6b46887a9f105eff6c2cfd688e51c (patch) | |
tree | cd3b5f37e521635988a6436d512fa58f639c22d2 /org.eclipse.ui.console | |
parent | 74181464f9d41d73883c744ad09c16e814d1f126 (diff) | |
download | eclipse.platform.debug-c9e938ae8fd6b46887a9f105eff6c2cfd688e51c.tar.gz eclipse.platform.debug-c9e938ae8fd6b46887a9f105eff6c2cfd688e51c.tar.xz eclipse.platform.debug-c9e938ae8fd6b46887a9f105eff6c2cfd688e51c.zip |
Bug 513367 - IllegalStateException while decoding output to ConsoleI20170315-2000I20170315-0500I20170314-2000I20170313-2000
Stream
Change-Id: Ia205ed73daab72454193a33c7e3abf053186caa5
Signed-off-by: Andreas Loth <andy_2639@justmail.de>
Diffstat (limited to 'org.eclipse.ui.console')
-rw-r--r-- | org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java index 8ee47071f..0cba219c1 100644 --- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java +++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java @@ -199,6 +199,9 @@ public class IOConsoleOutputStream extends OutputStream { */ @Override public synchronized void write(byte[] b, int off, int len) throws IOException { + if (closed) { + throw new IOException("Output Stream is closed"); //$NON-NLS-1$ + } StringBuilder builder = new StringBuilder(); this.decoder.decode(builder, b, off, len); encodedWrite(builder.toString()); @@ -323,6 +326,9 @@ public class IOConsoleOutputStream extends OutputStream { * @since 3.7 */ public synchronized void setCharset(Charset charset) throws IOException { + if (closed) { + throw new IOException("Output Stream is closed"); //$NON-NLS-1$ + } StringBuilder builder = new StringBuilder(); this.decoder.finish(builder); if (builder.length() > 0) { |