Skip to content

chore: Migrate from Charsets to StandardCharsets #971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.google.api.core.ApiFuture;
import com.google.api.core.SettableApiFuture;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Charsets;
import com.google.common.base.Strings;
import com.google.common.io.BaseEncoding;
import com.google.common.net.UrlEscapers;
Expand All @@ -32,6 +31,7 @@
import java.net.URI;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
Expand Down Expand Up @@ -108,8 +108,8 @@ static Map<String, String> getQueryParamsMap(String queryString)
for (String paramPair : paramPairs) {
String[] pairParts = paramPair.split("=");
// both the first and second part will be encoded now, we must decode them
String decodedKey = URLDecoder.decode(pairParts[0], Charsets.UTF_8.name());
String decodedValue = URLDecoder.decode(pairParts[1], Charsets.UTF_8.name());
String decodedKey = URLDecoder.decode(pairParts[0], StandardCharsets.UTF_8.name());
String decodedValue = URLDecoder.decode(pairParts[1], StandardCharsets.UTF_8.name());
String runningValue = paramsMap.get(decodedKey);
if (Strings.isNullOrEmpty(runningValue)) {
runningValue = decodedValue;
Expand Down