Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

NullPointerException when creating secret with Azure SDK Java #146

Open
kamil-di opened this issue Oct 10, 2024 · 0 comments
Open

NullPointerException when creating secret with Azure SDK Java #146

kamil-di opened this issue Oct 10, 2024 · 0 comments

Comments

@kamil-di
Copy link

For additional support or to discuss issues/features, please reach out to us on our Community or via email at [email protected]

Expected Behavior

Secret is created -- http response 201

Actual Behavior

  • There are missing properties in the response cause NPE -- missing RecoveryLevel

java.lang.NullPointerException: Cannot invoke "com.azure.security.keyvault.secrets.implementation.models.DeletionRecoveryLevel.toString()" because the return value of "com.azure.security.keyvault.secrets.implementation.models.SecretAttributes.getRecoveryLevel()" is null

at com.azure.security.keyvault.secrets.implementation.models.SecretsModelsUtils.setSecretPropertiesValues(SecretsModelsUtils.java:77)
at com.azure.security.keyvault.secrets.implementation.models.SecretsModelsUtils.createKeyVaultSecret(SecretsModelsUtils.java:45)
at com.azure.security.keyvault.secrets.SecretClient.lambda$setSecretWithResponse$0(SecretClient.java:269)
at com.azure.security.keyvault.secrets.SecretClient.callWithMappedException(SecretClient.java:1025)
at com.azure.security.keyvault.secrets.SecretClient.setSecretWithResponse(SecretClient.java:259)
at com.azure.security.keyvault.secrets.SecretClient.setSecret(SecretClient.java:205)

Steps to Reproduce the Problem

  1. KeyVaultSecret secret = new KeyVaultSecret("username", "ca");
    
secretClient.setSecret(secret);

Specifications

  • Image Version: 1.2.1
  • Docker Version: Server Version: 27.3.1 API Version: 1.47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant