Skip to content

Commit d83f484

Browse files
---
yaml --- r: 5819 b: refs/heads/master c: 0e4ed46 h: refs/heads/master i: 5817: 8fd0efb 5815: 36c218b
1 parent 364f33a commit d83f484

113 files changed

Lines changed: 8495 additions & 3610 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6bd2e329a9274404a8429c163cd4892f47c3ca2b
2+
refs/heads/master: 0e4ed46f8dfdc48bac0dba00f4bb50ed7b39b42d
33
refs/heads/travis: 47e4fee4fd5af9b2a8ce46f23c72ec95f9b195b2
44
refs/heads/gh-pages: 4154fc3537163299162c8c903f2d1386463dd7a3
55
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444

trunk/google-cloud-core-grpc/src/main/java/com/google/cloud/grpc/BaseGrpcServiceException.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import com.google.api.client.http.HttpResponseException;
2020
import com.google.api.core.InternalApi;
21-
import com.google.api.gax.grpc.ApiException;
21+
import com.google.api.gax.grpc.GrpcApiException;
2222
import com.google.cloud.BaseServiceException;
2323
import com.google.common.base.MoreObjects;
2424
import java.io.IOException;
@@ -64,13 +64,13 @@ private static ExceptionData makeExceptionData(IOException exception, boolean id
6464
.build();
6565
}
6666

67-
public BaseGrpcServiceException(ApiException apiException) {
67+
public BaseGrpcServiceException(GrpcApiException apiException) {
6868
super(ExceptionData.newBuilder()
6969
.setMessage(apiException.getMessage())
7070
.setCause(apiException)
7171
.setRetryable(apiException.isRetryable())
72-
.setCode(apiException.getStatusCode().value())
73-
.setReason(apiException.getStatusCode().name())
72+
.setCode(apiException.getStatusCode().getCode().value())
73+
.setReason(apiException.getStatusCode().getCode().name())
7474
.setLocation(null)
7575
.setDebugInfo(null)
7676
.build());

trunk/google-cloud-core-grpc/src/main/java/com/google/cloud/grpc/GrpcTransportOptions.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
import static com.google.common.base.MoreObjects.firstNonNull;
2020

2121
import com.google.api.core.InternalApi;
22-
import com.google.api.gax.core.FixedCredentialsProvider;
2322
import com.google.api.gax.core.CredentialsProvider;
2423
import com.google.api.gax.core.GaxProperties;
24+
import com.google.api.gax.core.FixedCredentialsProvider;
2525
import com.google.api.gax.core.NoCredentialsProvider;
2626
import com.google.api.gax.grpc.ChannelProvider;
2727
import com.google.api.gax.grpc.GaxGrpcProperties;
2828
import com.google.api.gax.grpc.InstantiatingChannelProvider;
29-
import com.google.api.gax.grpc.UnaryCallSettings;
3029
import com.google.api.gax.retrying.RetrySettings;
30+
import com.google.api.gax.rpc.UnaryCallSettings;
3131
import com.google.auth.Credentials;
3232
import com.google.cloud.NoCredentials;
3333
import com.google.cloud.ServiceOptions;
@@ -181,8 +181,9 @@ public ExecutorFactory<ScheduledExecutorService> getExecutorFactory() {
181181
/**
182182
* Returns a builder for API call settings.
183183
*/
184+
@Deprecated
184185
public UnaryCallSettings.Builder getApiCallSettings(RetrySettings retrySettings) {
185-
return UnaryCallSettings.newBuilder().setRetrySettingsBuilder(retrySettings.toBuilder());
186+
return UnaryCallSettings.newUnaryCallSettingsBuilder().setRetrySettings(retrySettings);
186187
}
187188

188189
/**
@@ -193,10 +194,6 @@ public static ChannelProvider setUpChannelProvider(
193194
providerBuilder.setEndpoint(serviceOptions.getHost())
194195
.setClientLibHeader(ServiceOptions.getGoogApiClientLibName(),
195196
firstNonNull(serviceOptions.getLibraryVersion(), ""));
196-
Credentials scopedCredentials = serviceOptions.getScopedCredentials();
197-
if (scopedCredentials != null && scopedCredentials != NoCredentials.getInstance()) {
198-
providerBuilder.setCredentialsProvider(FixedCredentialsProvider.create(scopedCredentials));
199-
}
200197
return providerBuilder.build();
201198
}
202199

trunk/google-cloud-core-grpc/src/test/java/com/google/cloud/grpc/BaseGrpcServiceExceptionTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import static org.junit.Assert.assertNull;
2626
import static org.junit.Assert.assertTrue;
2727

28-
import com.google.api.gax.grpc.ApiException;
28+
import com.google.api.gax.grpc.GrpcApiException;
2929
import com.google.cloud.BaseServiceException;
3030
import com.google.cloud.RetryHelper;
3131
import io.grpc.Status.Code;
@@ -73,7 +73,8 @@ public void testBaseServiceException() {
7373
assertNull(serviceException.getDebugInfo());
7474

7575
Exception cause = new IllegalArgumentException("bad arg");
76-
ApiException apiException = new ApiException(MESSAGE, cause, Code.INTERNAL, NOT_RETRYABLE);
76+
GrpcApiException apiException =
77+
new GrpcApiException(MESSAGE, cause, Code.INTERNAL, NOT_RETRYABLE);
7778
serviceException = new BaseGrpcServiceException(apiException);
7879
assertFalse(serviceException.isRetryable());
7980
assertEquals(MESSAGE, serviceException.getMessage());

0 commit comments

Comments
 (0)