From 9dc1631bcd7fa8b4c65b8dc341491212dc5b81f3 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 | 7 ++++--- 1 file changed, 4 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..b96fd20031 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,10 @@ 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