Skip to content

Commit 0a9962f

Browse files
authored
docs: Update docs for GoogleCredentialsProvider#setScopesToApply (#4057)
[GoogleCredentialsProvider#setScopesToApply](https://github.com/googleapis/sdk-platform-java/blob/b9a8c8924e7b03bca8a97e476abfd012b86f6d45/gax-java/gax/src/main/java/com/google/api/gax/core/GoogleCredentialsProvider.java#L123) would only work if the underlying credentials require the scopes to be set. Update the docs to reflect the intended behavior. Fixes googleapis/sdk-platform-java#3738
1 parent a7463e1 commit 0a9962f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

gax-java/gax/src/main/java/com/google/api/gax/core/GoogleCredentialsProvider.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ public abstract static class Builder {
118118

119119
/**
120120
* Sets the scopes to apply to the credentials that are acquired from Application Default
121-
* Credentials, before the credentials are sent to the service.
121+
* Credentials, before the credentials are sent to the service. These scopes only take effect if
122+
* the underlying credentials require them. See {@link GoogleCredentials#createScopedRequired()}
123+
* for more details on when scopes are necessary.
122124
*/
123125
public abstract Builder setScopesToApply(List<String> val);
124126

0 commit comments

Comments
 (0)