Merged
Conversation
bgavrilMS
approved these changes
Jun 21, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Public and confidential applications have a number of configurable options that are not relevant for managed identity applications, so as part of some refactoring (#715) a new parent abstract class was made to contain only configs that applied to all application types.
Doing so meant moving several public APIs in a builder class up to the new parent class's builder, and this caused a breaking change in 1.15.0 that was not caught during beta testing: as described in #806, if you used msal4j 1.15.0 and a dependency compiled with a pre-1.15.0 version, then your project would compile fine but you would hit a NoSuchMethodError at runtime if the dependency referenced one of the moved APIs.
This PR restores the APIs to the original abstract class to be compatible with pre-1.15.0 versions, and leaves the newer APIs as-is to be compatible with those using 1.15.0. Although this creates a bit of duplicate code, it was the simplest way to ensure compatibility with all versions.
Additionally, this PR adds a default method for a new API that was introduced into an interface in 1.15.0, and adds the revapi plugin in order catch these sorts of breaking API changes going forward.