Skip to content

Commit 06e2036

Browse files
Format
1 parent 570c1af commit 06e2036

File tree

5 files changed

+6
-10
lines changed

5 files changed

+6
-10
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ public DatabricksConfig setOAuthRedirectUrl(String redirectUrl) {
352352
}
353353

354354
/**
355-
* Returns the scopes to use for the current configuration. If no scopes were provided,
356-
* returns the default "all-apis" scope.
357-
*
355+
* Returns the scopes to use for the current configuration. If no scopes were provided, returns
356+
* the default "all-apis" scope.
357+
*
358358
* @return The scopes to use for the current configuration
359359
*/
360360
public List<String> getScopes() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ private synchronized void addDefaultCredentialsProviders(DatabricksConfig config
158158
}
159159

160160
providers.add(new PatCredentialsProvider());
161-
providers.add(new BasicCredentialsProvider());
161+
providers.add(new BasicCredentialsProvider());
162162
providers.add(new OAuthM2MServicePrincipalCredentialsProvider());
163163

164164
// Add OIDC-based providers

databricks-sdk-java/src/main/java/com/databricks/sdk/core/oauth/DatabricksOAuthTokenSource.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ public Token getToken() {
165165
params.put(GRANT_TYPE_PARAM, GRANT_TYPE);
166166
params.put(SUBJECT_TOKEN_PARAM, idToken.getValue());
167167
params.put(SUBJECT_TOKEN_TYPE_PARAM, SUBJECT_TOKEN_TYPE);
168-
if (scopes == null) {
169-
throw new IllegalArgumentException("Scopes cannot be null. Use .scopes() method on the builder to set scopes.");
170-
}
171168
params.put(SCOPE_PARAM, String.join(" ", scopes));
172169
params.put(CLIENT_ID_PARAM, clientId);
173170

databricks-sdk-java/src/main/java/com/databricks/sdk/core/oauth/ExternalBrowserCredentialsProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ CachedTokenSource performBrowserAuth(
109109
DatabricksConfig config, String clientId, String clientSecret, TokenCache tokenCache)
110110
throws IOException {
111111
LOGGER.debug("Performing browser authentication");
112-
112+
113113
// Get user-provided scopes and add required default scopes.
114114
Set<String> scopes = new HashSet<>(config.getScopes());
115115

@@ -119,7 +119,7 @@ CachedTokenSource performBrowserAuth(
119119
if (config.isAzure()) {
120120
scopes.add(config.getEffectiveAzureLoginAppId() + "/user_impersonation");
121121
}
122-
122+
123123
OAuthClient client =
124124
new OAuthClient.Builder()
125125
.withHttpClient(config.getHttpClient())

databricks-sdk-java/src/test/java/com/databricks/sdk/core/oauth/DatabricksOAuthTokenSourceTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import java.io.IOException;
1313
import java.net.MalformedURLException;
1414
import java.net.URL;
15-
import java.util.Arrays;
1615
import java.util.HashMap;
1716
import java.util.Map;
1817
import java.util.stream.Stream;

0 commit comments

Comments
 (0)