Skip to content

Commit 4357945

Browse files
authored
Merge pull request #1411 from microsoftgraph/bugfix/null-allowed-hosts
- fixes a bug where a null collection for allowed hosts would fail client initialization
2 parents 8007610 + e8668aa commit 4357945

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/microsoft/graph/core/authentication/AzureIdentityAccessTokenProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public AzureIdentityAccessTokenProvider(@Nonnull TokenCredential tokenCredential
2222
public AzureIdentityAccessTokenProvider(@Nonnull final TokenCredential tokenCredential, @Nonnull final String[] allowedHosts,
2323
@Nullable final ObservabilityOptions observabilityOptions, @Nonnull final String... scopes) {
2424
super(tokenCredential, allowedHosts, observabilityOptions, scopes);
25-
if (allowedHosts.length == 0) {
25+
if (allowedHosts == null || allowedHosts.length == 0) {
2626
final HashSet<String> allowedHostsSet = new HashSet<String>();
2727
allowedHostsSet.add("graph.microsoft.com");
2828
allowedHostsSet.add("graph.microsoft.us");

0 commit comments

Comments
 (0)