Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Rennie2012-10-01 20:36:57 +0000
committerMike Rennie2012-10-01 20:36:57 +0000
commit82015c577ff5e8dce7172b91f80218760f027bfa (patch)
treec1584153af18f69b2984b4d78497953f472243e8
parent1b3fb36f69327ec98cca0a3d9ef6f914e9e73b68 (diff)
downloadeclipse.platform.debug-82015c577ff5e8dce7172b91f80218760f027bfa.tar.gz
eclipse.platform.debug-82015c577ff5e8dce7172b91f80218760f027bfa.tar.xz
eclipse.platform.debug-82015c577ff5e8dce7172b91f80218760f027bfa.zip
Bug 382374 - Synchronization looks fishy inv20121001-203657I20121002-0800
org.eclipse.ui.console.IOConsoleOutputStream
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsoleOutputStream.java8
1 files changed, 4 insertions, 4 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 c035e1a6f..8d121e0fb 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -217,15 +217,15 @@ public class IOConsoleOutputStream extends OutputStream {
* @param str the string to write to the attached console.
* @throws IOException if the stream is closed.
*/
- public synchronized void write(String str) throws IOException {
+ public void write(String str) throws IOException {
if (fNeedsEncoding) {
- byte[] defaultBytes = str.getBytes();
+ byte[] defaultBytes = str.getBytes(fEncoding);
str = new String(defaultBytes, fEncoding);
}
encodedWrite(str);
}
- private void encodedWrite(String encodedString) throws IOException {
+ private synchronized void encodedWrite(String encodedString) throws IOException {
if(closed) {
throw new IOException("Output Stream is closed"); //$NON-NLS-1$
}

Back to the top