Forcibly cast in interop test

This commit is contained in:
Carl Mastrangelo 2015-07-31 14:12:23 -07:00
parent 14e774130d
commit c86b547dd3
1 changed files with 1 additions and 1 deletions

View File

@ -711,7 +711,7 @@ public abstract class AbstractTransportTest {
throws Exception { throws Exception {
// cast to ServiceAccountCredentials to double-check the right type of object was created. // cast to ServiceAccountCredentials to double-check the right type of object was created.
GoogleCredentials credentials = GoogleCredentials credentials =
(ServiceAccountCredentials) GoogleCredentials.fromStream(credentialsStream); ServiceAccountCredentials.class.cast(GoogleCredentials.fromStream(credentialsStream));
credentials = credentials.createScoped(Arrays.<String>asList(authScope)); credentials = credentials.createScoped(Arrays.<String>asList(authScope));
TestServiceGrpc.TestServiceBlockingStub stub = blockingStub TestServiceGrpc.TestServiceBlockingStub stub = blockingStub
.withInterceptors(new ClientAuthInterceptor(credentials, testServiceExecutor)); .withInterceptors(new ClientAuthInterceptor(credentials, testServiceExecutor));