Kaydet (Commit) e747737a authored tarafından Noel Grandin's avatar Noel Grandin

java: synching on an interned String object not good

Just remove this field altogether, it was not being used for
anything other than synchronisation.

Change-Id: I982385f9eb7aed3fff0adf85d2a37bfe003d937b
üst 52d84448
...@@ -120,7 +120,6 @@ public class ProcessHandler ...@@ -120,7 +120,6 @@ public class ProcessHandler
private boolean isFinished = false; private boolean isFinished = false;
private boolean isStarted = false; private boolean isStarted = false;
private long mTimeOut = 0; private long mTimeOut = 0;
private String stdInBuff = "";
private Pump stdout = null; private Pump stdout = null;
private Pump stderr = null; private Pump stderr = null;
private PrintStream stdIn = null; private PrintStream stdIn = null;
...@@ -546,11 +545,9 @@ public class ProcessHandler ...@@ -546,11 +545,9 @@ public class ProcessHandler
return; return;
} }
synchronized(stdInBuff) synchronized(this)
{ {
stdIn.print(stdInBuff);
stdIn.flush(); stdIn.flush();
stdInBuff = "";
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment