Skip to content

Commit e18c9b8

Browse files
authored
chore: Update to ServiceAccountCredentials.fromStream for WorkerProxy.serviceKeyFile (googleapis#4183)
1 parent 24fe194 commit e18c9b8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import com.google.api.gax.rpc.TransportChannelProvider;
2727
import com.google.api.gax.rpc.UnavailableException;
2828
import com.google.auth.Credentials;
29-
import com.google.auth.oauth2.GoogleCredentials;
3029
import com.google.auth.oauth2.ServiceAccountCredentials;
3130
import com.google.cloud.ByteArray;
3231
import com.google.cloud.Date;
@@ -807,7 +806,7 @@ private synchronized Spanner getClient(long timeoutSeconds, boolean useMultiplex
807806
credentials = NoCredentials.getInstance();
808807
} else {
809808
credentials =
810-
GoogleCredentials.fromStream(
809+
ServiceAccountCredentials.fromStream(
811810
new ByteArrayInputStream(
812811
FileUtils.readFileToByteArray(new File(WorkerProxy.serviceKeyFile))),
813812
HTTP_TRANSPORT_FACTORY);

0 commit comments

Comments
 (0)