ChangeIndexer: Remove dead executor == null cases

The executor is always populated to a non-null value, since it's an
@Assisted argument that is not @Nullable.

Change-Id: Ic61a73a0fd81ab3cd14ab7837c091787ced4de76
This commit is contained in:
Dave Borowitz
2016-11-14 18:13:25 -08:00
parent 84c49a63d2
commit 18a424c0f6

View File

@@ -153,9 +153,7 @@ public class ChangeIndexer {
*/
public CheckedFuture<?, IOException> indexAsync(Project.NameKey project,
Change.Id id) {
return executor != null
? submit(new IndexTask(project, id))
: Futures.<Object, IOException> immediateCheckedFuture(null);
return submit(new IndexTask(project, id));
}
/**
@@ -235,9 +233,7 @@ public class ChangeIndexer {
* @return future for the deleting task.
*/
public CheckedFuture<?, IOException> deleteAsync(Change.Id id) {
return executor != null
? submit(new DeleteTask(id))
: Futures.<Object, IOException> immediateCheckedFuture(null);
return submit(new DeleteTask(id));
}
/**