-
Notifications
You must be signed in to change notification settings - Fork 38.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore duplicate @Priority values when determining highest priority
Prior to this commit, DefaultListableBeanFactory's determineHighestPriorityCandidate() method sometimes failed to determine the highest priority candidate if duplicate priority candidates were detected whose priority was not the highest priority in the candidate set. In addition, the bean registration order affected the outcome of the algorithm: if the highest priority was detected before other duplicate priorities were detected, the algorithm succeeded in determining the highest priority candidate. This commit addresses those shortcomings by ignoring duplicate @Priority values unless the duplication is for the highest priority encountered, in which case a NoUniqueBeanDefinitionException is still thrown to signal that multiple beans were found with the same "highest priority". Closes gh-33733
- Loading branch information
Showing
2 changed files
with
91 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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