From 822ac0cfab0ae5364d34f5db0aa60c0cc7db34a2 Mon Sep 17 00:00:00 2001 From: detmerl Date: Mon, 16 Sep 2024 15:34:41 -0400 Subject: [PATCH] cleaned up append token logic --- .../java/com/google/api/gax/rpc/ApiClientHeaderProvider.java | 2 -- .../test/java/com/google/api/gax/core/GaxPropertiesTest.java | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java b/gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java index 32d7969e09..8017efe618 100644 --- a/gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java +++ b/gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java @@ -48,13 +48,11 @@ public class ApiClientHeaderProvider implements HeaderProvider, Serializable { public static final String API_VERSION_HEADER_KEY = "x-goog-api-version"; private static final String protobufVersionAppendValue = "--" + PROTOBUF_HEADER_VERSION_KEY + "-" + GaxProperties.getProtobufVersion(); - private static String tokensToAppendProfobufVersionTo = ""; private final Map headers; protected ApiClientHeaderProvider(Builder builder) { ImmutableMap.Builder headersBuilder = ImmutableMap.builder(); - // tokensToAppendProfobufVersionTo = "(gccl|gapic).*"; if (builder.getApiClientHeaderKey() != null) { StringBuilder apiClientHeaderValue = new StringBuilder(); diff --git a/gax-java/gax/src/test/java/com/google/api/gax/core/GaxPropertiesTest.java b/gax-java/gax/src/test/java/com/google/api/gax/core/GaxPropertiesTest.java index 7795508f77..1369ec35ae 100644 --- a/gax-java/gax/src/test/java/com/google/api/gax/core/GaxPropertiesTest.java +++ b/gax-java/gax/src/test/java/com/google/api/gax/core/GaxPropertiesTest.java @@ -30,7 +30,9 @@ package com.google.api.gax.core; import static com.google.api.gax.core.GaxProperties.getBundleVersion; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.common.base.Strings; import java.io.IOException;