Make the code clearer, fixes #531.

This commit is contained in:
Xudong Ma 2015-06-19 10:10:08 -07:00
parent fd52a765ed
commit 131ba5d1da
1 changed files with 4 additions and 1 deletions

View File

@ -58,9 +58,12 @@ public class ClientAuthInterceptor implements ClientInterceptor {
private Metadata.Headers cached;
private Map<String, List<String>> lastMetadata;
// TODO(louiscryan): refresh token asynchronously with this executor.
private Executor executor;
public ClientAuthInterceptor(Credentials credentials, Executor executor) {
this.credentials = Preconditions.checkNotNull(credentials);
this.executor = Preconditions.checkNotNull(executor);
}
@Override
@ -74,7 +77,7 @@ public class ClientAuthInterceptor implements ClientInterceptor {
throws Exception {
Metadata.Headers cachedSaved;
synchronized (ClientAuthInterceptor.this) {
// TODO(lryan): This is icky but the current auth library stores the same
// TODO(louiscryan): This is icky but the current auth library stores the same
// metadata map until the next refresh cycle. This will be fixed once
// https://github.com/google/google-auth-library-java/issues/3
// is resolved.