Skip to content

Commit e19332d

Browse files
authored
docs: Update docs for GoogleCredentialsProvider#setScopesToApply (#4057)
[GoogleCredentialsProvider#setScopesToApply](https://github.com/googleapis/sdk-platform-java/blob/343a8ef9fe2db8897f83a865805cb1a04eb1be5a/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 50c8931 commit e19332d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

sdk-platform-java/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)