Make getManagedIdentitySource static #864
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adjusts
ManagedIdentityApplication
to make thegetManagedIdentitySource
method static. This is to solve a niche issue when testing an application that uses Managed Identity, where a developer would want to test an app with multiple mocked MI sources on one machine.Although this looks like it is adjusting public APIs, the actual change in the built package is minor and there should be no breaking change:
@Getter
annotation was creating a public method calledgetManagedIdentitySource
in the final packagegetManagedIdentitySource
method that is also public, and removes the annotation for Lombok to create that same methodManagedIdentityClient.getManagedIdentitySource()
rather than the current value of themanagedIdentitySource
fieldAdditionally, static methods can be access through an instance of a class just like a non-static method, so making this method static will at worst cause a minor warning in an IDE about using a static method improperly. The RevAPI plugin was used to ensure that this was the only part of the API that could be considered 'changed' when compared to the last released msal4j package.