Skip to content

Commit d5bec03

Browse files
committed
Reverted minor change in GrpcRetryerUtils that's no longer needed.
1 parent 664696e commit d5bec03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

temporal-serviceclient/src/main/java/io/temporal/internal/retryer/GrpcRetryerUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class GrpcRetryerUtils {
2929
@Nonnull StatusRuntimeException currentException,
3030
@Nonnull RpcRetryOptions options,
3131
GetSystemInfoResponse.Capabilities serverCapabilities) {
32-
Status status = currentException.getStatus();
32+
Status.Code code = currentException.getStatus().getCode();
3333

34-
switch (status.getCode()) {
34+
switch (code) {
3535
// CANCELLED and DEADLINE_EXCEEDED usually considered non-retryable in GRPC world, for
3636
// example:
3737
// https://github.com/grpc-ecosystem/go-grpc-middleware/blob/master/retry/retry.go#L287
@@ -65,7 +65,7 @@ class GrpcRetryerUtils {
6565
break;
6666
default:
6767
for (RpcRetryOptions.DoNotRetryItem pair : options.getDoNotRetry()) {
68-
if (pair.getCode() == status.getCode()
68+
if (pair.getCode() == code
6969
&& (pair.getDetailsClass() == null
7070
|| StatusUtils.hasFailure(currentException, pair.getDetailsClass()))) {
7171
return currentException;

0 commit comments

Comments
 (0)