]> source.dussan.org Git - jgit.git/commit
Change StreamGobbler to Runnable to avoid unused Future 40/89240/2
authorShawn Pearce <spearce@spearce.org>
Fri, 20 Jan 2017 16:41:29 +0000 (08:41 -0800)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 21 Jan 2017 08:44:14 +0000 (09:44 +0100)
commit131b09106f76cdfca1d7292f2cc39a35834c7a67
treeb5a5596015704078f456e6ba8bc00f17873b0641
parentf503a9f5b7812103644367109f1211470d61b383
Change StreamGobbler to Runnable to avoid unused Future

It can be considered a programming error to create a Future<T>
but do nothing with that object. There is an async computation
happening and without holding and checking the Future for done
or exception the caller has no idea if it has completed.

FS doesn't really care about these StreamGobblers finishing.
Instead use Runnable with execute(Runnable), which doesn't
return a Future.

Change-Id: I93b66d1f6c869e66be5c1169d8edafe781e601f6
org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java