-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug
Milestone
Description
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
- Refactor
BeanFactoryAnnotationUtils
to consistently throw specific subclasses ofBeansException
.
Affects: 3.1.2
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug