Skip to content

Commit 26e5e76

Browse files
committed
chore: Restore old code
1 parent ca1c4f4 commit 26e5e76

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ public static ImpersonatedCredentials fromStream(
436436
* @return the credentials defined by the JSON
437437
* @throws IOException if the credential cannot be created from the JSON.
438438
*/
439+
@SuppressWarnings("unchecked")
439440
static ImpersonatedCredentials fromJson(
440441
Map<String, Object> json, HttpTransportFactory transportFactory) throws IOException {
441442
checkNotNull(json);
@@ -790,7 +791,10 @@ protected Builder() {}
790791
/**
791792
* @param sourceCredentials The source credentials to use for impersonation.
792793
* @param targetPrincipal The service account to impersonate.
794+
* @deprecated Use {@link #Builder(ImpersonatedCredentials)} instead. This constructor will be
795+
* removed in a future release.
793796
*/
797+
@Deprecated
794798
protected Builder(GoogleCredentials sourceCredentials, String targetPrincipal) {
795799
this.sourceCredentials = sourceCredentials;
796800
this.targetPrincipal = targetPrincipal;

0 commit comments

Comments
 (0)