From a2ab72776d6b90ac5725e5dc992a00015edf6f0b Mon Sep 17 00:00:00 2001 From: Tobias Happ Date: Fri, 2 Oct 2020 14:27:15 +0200 Subject: [PATCH] fix: prevent npe caused by missing parentheses --- .../com/google/api/gax/retrying/BasicRetryingFuture.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gax/src/main/java/com/google/api/gax/retrying/BasicRetryingFuture.java b/gax/src/main/java/com/google/api/gax/retrying/BasicRetryingFuture.java index 3e85937bfc..33f975f421 100644 --- a/gax/src/main/java/com/google/api/gax/retrying/BasicRetryingFuture.java +++ b/gax/src/main/java/com/google/api/gax/retrying/BasicRetryingFuture.java @@ -176,9 +176,12 @@ void handleAttempt(Throwable throwable, ResponseT response) { Level.FINEST, "Retrying with:\n{0}\n{1}\n{2}\n{3}", new Object[] { - "enclosingMethod: " + callable.getClass().getEnclosingMethod() != null - ? callable.getClass().getEnclosingMethod().getName() - : "", + "enclosingMethod: " + + ( + callable.getClass().getEnclosingMethod() != null + ? callable.getClass().getEnclosingMethod().getName() + : "" + ), "attemptCount: " + attemptSettings.getAttemptCount(), "delay: " + attemptSettings.getRetryDelay(), "retriableException: " + throwable