Skip to content

Restore lenient null return value for ConditionContext.getBeanFactory() [SPR-16866] #21405

@spring-projects-issues

Description

@spring-projects-issues

Andy Wilkinson opened SPR-16866 and commented

Following the nullability changes in 5.0, three methods on ConditionContext may no longer return null, but may now throw an IlegalStateException instead. Those methods are:

  • getRegistry()
  • getBeanFactory()
  • getClassLoader()

It would be useful if their javadoc documented that an IllegalStateException may now be thrown.


Affects: 5.0.6

Reference URL: spring-projects/spring-boot#13226

Referenced from: commits 50d6d90, 46a89d9

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions