From 3b66e57c1cf2fb3777a28d3be4bb09bc7665f8b9 Mon Sep 17 00:00:00 2001 From: Diego Alonso Marquez Palacios Date: Thu, 4 Jul 2024 15:33:49 -0400 Subject: [PATCH] fix: `BaseApiTracer` and derived classes to noop on attemptFailed via overloaded method call --- .../java/com/google/api/gax/tracing/BaseApiTracer.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gax-java/gax/src/main/java/com/google/api/gax/tracing/BaseApiTracer.java b/gax-java/gax/src/main/java/com/google/api/gax/tracing/BaseApiTracer.java index 73ead433ec..8feb1286d2 100644 --- a/gax-java/gax/src/main/java/com/google/api/gax/tracing/BaseApiTracer.java +++ b/gax-java/gax/src/main/java/com/google/api/gax/tracing/BaseApiTracer.java @@ -29,6 +29,8 @@ */ package com.google.api.gax.tracing; +import static com.google.api.gax.util.TimeConversionUtils.toThreetenDuration; + import com.google.api.core.InternalApi; import com.google.api.core.ObsoleteApi; @@ -105,7 +107,8 @@ public void attemptCancelled() { @Override public void attemptFailedDuration(Throwable error, java.time.Duration delay) { - // noop + // noop via attemptFailed(Throwable error, org.threeten.Duration) + attemptFailed(error, toThreetenDuration(delay)); } /** @@ -113,7 +116,7 @@ public void attemptFailedDuration(Throwable error, java.time.Duration delay) { * instead. */ @Override - @ObsoleteApi("Use attemptFailed(Throwable, java.time.Duration) instead") + @ObsoleteApi("Use attemptFailedDuration(Throwable, java.time.Duration) instead") public void attemptFailed(Throwable error, org.threeten.bp.Duration delay) { // noop }