Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Loth2017-03-13 01:50:04 -0400
committerSarika Sinha2017-03-13 01:50:04 -0400
commitc9e938ae8fd6b46887a9f105eff6c2cfd688e51c (patch)
treecd3b5f37e521635988a6436d512fa58f639c22d2 /org.eclipse.ui.console
parent74181464f9d41d73883c744ad09c16e814d1f126 (diff)
downloadeclipse.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.java6
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) {

Back to the top