-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Resolve api review comments for azure-security-keyvault-jca
#47891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve api review comments for azure-security-keyvault-jca
#47891
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses API review feedback for azure-security-keyvault-jca by introducing a builder-based construction API for KeyVaultLoadStoreParameter, deprecating older constructors, and refactoring call sites/tests to use the fluent builder.
Changes:
- Added
KeyVaultLoadStoreParameter.BuilderandKeyVaultLoadStoreParameter.builder(String)for fluent construction. - Deprecated several existing
KeyVaultLoadStoreParameterconstructors and updated internal/test usage to prefer the builder. - Refactored
KeyVaultKeyStore.getKeyVaultKeyStoreBySystemProperty()to construct parameters via the builder (including the challenge verification flag).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameter.java |
Introduces builder API and deprecates older constructors; refactors construction internals. |
sdk/keyvault/azure-security-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultKeyStore.java |
Switches system-property parameter creation to the new builder flow. |
sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreTest.java |
Updates test setup to create parameters using the builder. |
...y-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameter.java
Show resolved
Hide resolved
...y-keyvault-jca/src/main/java/com/azure/security/keyvault/jca/KeyVaultLoadStoreParameter.java
Show resolved
Hide resolved
…Azure#47891)" This reverts commit 5021a18.
Link to related API review page: https://spa.apiview.dev/review/3eb39a8f46944061ae3dd8536b3ff095?activeApiRevisionId=9ea852b0dd2a4dc38531617a1e0268cc&diffApiRevisionId=b40c95a2f29c423d959bd112d8e51598&diffStyle=trees
This pull request modernizes and improves the construction of
KeyVaultLoadStoreParameterobjects in the Azure Key Vault JCA library by introducing a builder pattern. This change makes the API more flexible and maintainable, and deprecates the older multi-argument constructors. The update also refactors usages throughout the codebase and test suite to leverage the new builder approach.API modernization and maintainability
Builderinner class and a staticbuilder(String keyVaultUri)method inKeyVaultLoadStoreParameter, providing a fluent API for constructing instances and reducing reliance on overloaded constructors.KeyVaultLoadStoreParameterin favor of the builder pattern, with clear Javadoc annotations guiding users to the new API. [1] [2] [3]Refactoring usages
KeyVaultKeyStore.getKeyVaultKeyStoreBySystemProperty()to use the builder for constructingKeyVaultLoadStoreParameterand setting properties, improving readability and maintainability.KeyVaultKeyStoreTest.setEnvironmentProperty()to use the builder pattern for creatingKeyVaultLoadStoreParameterinstances.Minor code improvements
getAccessToken()method package-private to better encapsulate access withinKeyVaultLoadStoreParameter.If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines