Skip to content

Conversation

@g2vinay
Copy link
Member

@g2vinay g2vinay commented Feb 9, 2026

Replace reflection-dependent AzureIdentityEnvVars enum usage with direct string literal to avoid NullPointerException in GraalVM native images.

The ExpandableStringEnum base class uses reflection for static field initialization, which doesn't work in native images without explicit configuration. Using the string literal 'AZURE_TOKEN_CREDENTIALS' directly eliminates the reflection dependency while maintaining identical runtime behavior.

Fixes NullPointerException in IdentityClientOptions.loadFromConfiguration when running in GraalVM native builds (e.g., Quarkus applications).

Replace reflection-dependent AzureIdentityEnvVars enum usage with direct
string literal to avoid NullPointerException in GraalVM native images.

The ExpandableStringEnum base class uses reflection for static field
initialization, which doesn't work in native images without explicit
configuration. Using the string literal 'AZURE_TOKEN_CREDENTIALS' directly
eliminates the reflection dependency while maintaining identical runtime
behavior.

Fixes NullPointerException in IdentityClientOptions.loadFromConfiguration
when running in GraalVM native builds (e.g., Quarkus applications).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

1 participant