Skip to content

Commit

Permalink
FireStore:deprecated warnings removed (#5247)
Browse files Browse the repository at this point in the history
* deprecated warnings removed

* review changes

* directExecutor used to remove deprecated warnings
  • Loading branch information
abhinav-qlogic authored and sduskis committed Jun 4, 2019
1 parent b2dc157 commit 9d9404b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.google.cloud.firestore.spi.v1.FirestoreRpc;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.firestore.v1.BatchGetDocumentsRequest;
import com.google.firestore.v1.BatchGetDocumentsResponse;
import com.google.firestore.v1.DatabaseRootName;
Expand Down Expand Up @@ -339,9 +340,11 @@ public void onSuccess(List<WriteResult> writeResults) {
span.end();
resultFuture.set(userResult);
}
});
},
MoreExecutors.directExecutor());
}
});
},
MoreExecutors.directExecutor());
}

private SettableApiFuture<T> invokeUserCallback() {
Expand Down Expand Up @@ -396,12 +399,14 @@ public void onFailure(Throwable throwable) {
public void onSuccess(Void ignored) {
resultFuture.setException(throwable);
}
});
},
MoreExecutors.directExecutor());
} else {
resultFuture.setException(throwable);
}
}
});
},
MoreExecutors.directExecutor());
}

/** Returns whether the user has opted into receiving dates as com.google.cloud.Timestamp. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public GrpcFirestoreRpc(final FirestoreOptions options) throws IOException {
|| NoCredentials.getInstance().equals(options.getCredentials())) {
ManagedChannel managedChannel =
ManagedChannelBuilder.forTarget(options.getHost())
.usePlaintext(true)
.usePlaintext()
.executor(executor)
.build();
TransportChannel transportChannel = GrpcTransportChannel.create(managedChannel);
Expand Down

0 comments on commit 9d9404b

Please sign in to comment.