Browse Source

Remove deprecated StreamCopyThread#flush

StreamCopyThread: Do not let flush interrupt a write.
flush calls interrupt() to interrupt a pending read and trigger a
flush.  Unfortunately that interrupt() call can also interrupt a
pending write, putting Jsch in a bad state and triggering "Short read
of block" errors.

Change-Id: I11f8a014fd72df06617cc8731d992eb14cc32a67
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.0
Matthias Sohn 7 years ago
parent
commit
bfe89332a4
  1. 14
      org.eclipse.jgit/src/org/eclipse/jgit/util/io/StreamCopyThread.java

14
org.eclipse.jgit/src/org/eclipse/jgit/util/io/StreamCopyThread.java

@ -80,20 +80,6 @@ public class StreamCopyThread extends Thread {
writeLock = new Object();
}
/**
* Request the thread to flush the output stream as soon as possible.
* <p>
* This is an asynchronous request to the thread. The actual flush will
* happen at some future point in time, when the thread wakes up to process
* the request.
*/
@Deprecated
public void flush() {
synchronized (writeLock) {
interrupt();
}
}
/**
* Request that the thread terminate, and wait for it.
* <p>

Loading…
Cancel
Save