Skip to content

Commit

Permalink
fix: adapt to introduction of java.time in gax
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomarquezp committed Jul 5, 2024
1 parent ade7702 commit cb2ffe9
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
import java.util.List;
import org.threeten.bp.Duration;

import static com.google.api.gax.util.TimeConversionUtils.toJavaTimeDuration;

@InternalApi
public class CompositeTracer extends BaseApiTracer {
Expand Down Expand Up @@ -108,9 +109,14 @@ public void attemptCancelled() {
}

@Override
public void attemptFailed(Throwable error, Duration delay) {
public void attemptFailed(Throwable error, org.threeten.bp.Duration delay) {
attemptFailedDuration(error, toJavaTimeDuration(delay));
}

@Override
public void attemptFailedDuration(Throwable error, java.time.Duration delay) {
for (ApiTracer child : children) {
child.attemptFailed(error, delay);
child.attemptFailedDuration(error, delay);
}
}

Expand Down

0 comments on commit cb2ffe9

Please sign in to comment.