Skip to content
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

BeanFactoryAnnotationUtils should throw BeansException [SPR-9652] #14286

Closed
spring-projects-issues opened this issue Jul 28, 2012 · 0 comments
Closed
Assignees
Labels
in: core type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jul 28, 2012

Sam Brannen opened SPR-9652 and commented

Status Quo

Utility methods in BeanFactoryAnnotationUtils, which was introduced in Spring 3.1.2, throw IllegalStateException; whereas, utility methods in the existing BeanFactoryUtils consistently throw specific subclasses of BeansException.

This inconsistency between BeanFactoryAnnotationUtils and BeanFactoryUtils makes it difficult to handle exceptions in a unified manner.

For example, it would be much more suitable for BeanFactoryAnnotationUtils.qualifiedBeanOfType() to throw a NoSuchBeanDefinitionException rather than an IllegalStateException.

Deliverables

  1. Refactor BeanFactoryAnnotationUtils to consistently throw specific subclasses of BeansException.

Affects: 3.1.2

Referenced from: commits 7ebfd9e, 430db26

@spring-projects-issues spring-projects-issues added type: bug in: core labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.1.3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: bug
Projects
None yet
Development

No branches or pull requests

2 participants