]> source.dussan.org Git - jgit.git/commitdiff
Remove deprecated StreamCopyThread#flush 26/119126/2
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 9 Mar 2018 23:54:51 +0000 (00:54 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 10 Mar 2018 18:41:31 +0000 (19:41 +0100)
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>
org.eclipse.jgit/src/org/eclipse/jgit/util/io/StreamCopyThread.java

index 5c1af9efad931f6907924eff57098988f9cbc4c5..efdddeee9596889c063df50e274f650107474573 100644 (file)
@@ -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>