Skip to content

Commit b19225a

Browse files
fix fmt
1 parent 1cb43a3 commit b19225a

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

databricks-sdk-java/src/main/java/com/databricks/sdk/core/DatabricksCliCredentialsProvider.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,13 @@ public OAuthHeaderFactory configure(DatabricksConfig config) {
119119
if (config.isScopesExplicitlySet()) {
120120
List<String> scopes = config.getScopes();
121121
effectiveSource =
122-
() -> {
123-
Token t = tokenSource.getToken();
124-
validateTokenScopes(t, scopes, host);
125-
return t;
122+
new TokenSource() {
123+
@Override
124+
public Token getToken() {
125+
Token t = tokenSource.getToken();
126+
validateTokenScopes(t, scopes, host);
127+
return t;
128+
}
126129
};
127130
} else {
128131
effectiveSource = tokenSource;

databricks-sdk-java/src/main/java/com/databricks/sdk/core/DatabricksConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ public DatabricksConfig setScopes(List<String> scopes) {
436436

437437
/**
438438
* Returns true if scopes were explicitly configured (either directly in code or loaded from a
439-
* config file). When scopes are not set, getScopes() defaults to ["all-apis"], which
440-
* would cause false-positive mismatches during scope validation.
439+
* config file). When scopes are not set, getScopes() defaults to ["all-apis"], which would cause
440+
* false-positive mismatches during scope validation.
441441
*/
442442
boolean isScopesExplicitlySet() {
443443
return scopes != null && !scopes.isEmpty();

0 commit comments

Comments
 (0)