From 12c018897862a41a303389cf96ec1097bcb95c37 Mon Sep 17 00:00:00 2001 From: Kurt Alfred Kluever Date: Fri, 20 Sep 2024 12:55:32 -0400 Subject: [PATCH] Migrate from deprecated Guava `Charsets` to the JDK's `StandardCharsets`. (#1456) Co-authored-by: Lawrence Qiu --- .../java/com/google/auth/oauth2/CloudShellCredentials.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oauth2_http/java/com/google/auth/oauth2/CloudShellCredentials.java b/oauth2_http/java/com/google/auth/oauth2/CloudShellCredentials.java index c65b0c43d..7024e1e1e 100644 --- a/oauth2_http/java/com/google/auth/oauth2/CloudShellCredentials.java +++ b/oauth2_http/java/com/google/auth/oauth2/CloudShellCredentials.java @@ -32,7 +32,6 @@ package com.google.auth.oauth2; import com.google.api.client.json.JsonParser; -import com.google.common.base.Charsets; import com.google.common.base.MoreObjects; import com.google.errorprone.annotations.CanIgnoreReturnValue; import java.io.BufferedReader; @@ -40,6 +39,7 @@ import java.io.InputStreamReader; import java.io.OutputStream; import java.net.Socket; +import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -59,7 +59,7 @@ public class CloudShellCredentials extends GoogleCredentials { protected static final String GET_AUTH_TOKEN_REQUEST = "2\n[]"; protected static final byte[] GET_AUTH_TOKEN_REQUEST_BYTES = - (GET_AUTH_TOKEN_REQUEST + "\n").getBytes(Charsets.UTF_8); + (GET_AUTH_TOKEN_REQUEST + "\n").getBytes(StandardCharsets.UTF_8); private final int authPort;