Skip to content

Commit

Permalink
Remove deprecated google Base64 class usage
Browse files Browse the repository at this point in the history
  • Loading branch information
regadas authored and ebyhr committed Jun 1, 2023
1 parent 1cb1cce commit 1f67572
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
package io.trino.plugin.bigquery;

import com.google.api.client.util.Base64;
import com.google.auth.Credentials;
import com.google.auth.oauth2.GoogleCredentials;
import com.google.common.base.Supplier;
Expand All @@ -26,6 +25,7 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Base64;
import java.util.Optional;

public class StaticBigQueryCredentialsSupplier
Expand Down Expand Up @@ -55,7 +55,7 @@ public Optional<Credentials> getCredentials(ConnectorSession session)
private static Credentials createCredentialsFromKey(String key)
{
try {
return GoogleCredentials.fromStream(new ByteArrayInputStream(Base64.decodeBase64(key)));
return GoogleCredentials.fromStream(new ByteArrayInputStream(Base64.getDecoder().decode(key)));
}
catch (IOException e) {
throw new UncheckedIOException("Failed to create Credentials from key", e);
Expand Down

0 comments on commit 1f67572

Please sign in to comment.